31 Mar, 2011

1 commit


09 Sep, 2008

1 commit


08 Sep, 2008

1 commit

  • This patch provides a mechanism for platforms to be able to supply the
    LED configuration via platform data, rather than having to hard code
    it in smc91x.h.

    Acked-by: Eric Miao
    Acked-by: Nicolas Pitre
    Acked-by: Jeff Garzik
    Signed-off-by: Russell King

    Russell King
     

13 Jul, 2008

4 commits

  • Now that the original SMC_USE_PXA_DMA specific code will always being
    built if CONFIG_ARCH_PXA is defined, so to make this part of the code
    to be PXA public, and still prevent it from being built if support of
    PXA is not selected.

    A SMC91X_USE_DMA flag is added to the platform data to allow platform
    to choose its usage of DMA. Note this flag itself is so named to be
    generic enough (assuming other platforms can also use DMA).

    It keeps backward compatibility to set the SMC91X_USE_DMA flag if
    SMC_USE_PXA_DMA is still defined.

    Signed-off-by: Eric Miao
    Acked-by: Nicolas Pitre
    Acked-by: Jeff Garzik
    Signed-off-by: Russell King

    Eric Miao
     
  • Now one can use the following code

    #define SMC_IO_SHIFT lp->io_shift

    to make SMC_IO_SHIFT a variable. This, however, will slightly increase
    the CPU overhead and have negative impact on the network performance.
    The tradeoff is, this can be specified in the smc91x platform data so
    that multiple boards support can be built in a single zImage.

    Signed-off-by: Eric Miao
    Acked-by: Nicolas Pitre
    Acked-by: Jeff Garzik
    Signed-off-by: Russell King

    Eric Miao
     
  • And also favors the usage of SMC91X_NOWAIT over the hardcoded SMC_NOWAIT
    by converting "nowait" (module parameter overridable) to platform flag.

    There are several possibilities:

    1. platform data present - preferred and use as is
    2. platform data absent - use "nowait", it can be:
    a. SMC_NOWAIT if defined
    b. default to 0 if SMC_NOWAIT isn't defined
    c. overriden by module parameter

    Signed-off-by: Eric Miao
    Acked-by: Nicolas Pitre
    Acked-by: Jeff Garzik
    Signed-off-by: Russell King

    Eric Miao
     
  • IRQ trigger type can be specified in the IRQ resource definition by
    IORESOURCE_IRQ_*, we need only one way to specify this.

    This also fixes the following small issue:

    To allow dynamic support for multiple platforms, when those relevant
    macros are not defined for one specific platform, the default case
    will be:

    - SMC_DYNAMIC_BUS_CONFIG defined
    - and SMC_IRQ_FLAGS = IRQF_TRIGGER_RISING

    While if "irq_flags" is missing when defining the smc91x_platdata,
    usually as follows:

    static struct smc91x_platdata xxxx_smc91x_data = {
    .flags = SMC91X_USE_XXBIT,
    };

    The lp->cfg.irq_flags will always be overriden by the above structure
    (due to a memcpy), thus rendering lp->cfg.irq_flags to be "0" always.
    (regardless of the default SMC_IRQ_FLAGS or IORESOURCE_IRQ_* flags)

    Fixes this by forcing to use IORESOURCE_IRQ_* flags if present, and
    make the only user of smc91x_platdata.irq_flags (renesas/migor) to
    use IORESOURCE_IRQ_*.

    Signed-off-by: Eric Miao
    Acked-by: Nicolas Pitre
    Acked-by: Jeff Garzik
    Signed-off-by: Russell King

    Eric Miao
     

17 Mar, 2008

1 commit

  • This patch introduces struct smc91x_platdata and modifies the driver so
    bus width is checked during run time using SMC_nBIT() instead of
    SMC_CAN_USE_nBIT.

    V2 keeps static configuration lean using SMC_DYNAMIC_BUS_CONFIG.

    Signed-off-by: Magnus Damm
    Acked-by: Nicolas Pitre
    Signed-off-by: Jeff Garzik

    Magnus Damm