From 357fe2c6d2b12482abd1c3f24a086a2f507f03fc Mon Sep 17 00:00:00 2001 From: Vernon Sauder Date: Fri, 16 Jan 2009 13:23:19 +0000 Subject: smc91x: enable ethtool EEPROM interface Signed-off-by: Vernon Sauder Acked-by: Nicolas Pitre Signed-off-by: David S. Miller --- drivers/net/smc91x.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers/net/smc91x.h') diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h index c4ccd121bc9c..ed9ae43523a1 100644 --- a/drivers/net/smc91x.h +++ b/drivers/net/smc91x.h @@ -1141,6 +1141,16 @@ static const char * chip_ids[ 16 ] = { #define SMC_GET_MII(lp) SMC_inw(ioaddr, MII_REG(lp)) +#define SMC_GET_GP(lp) SMC_inw(ioaddr, GP_REG(lp)) + +#define SMC_SET_GP(lp, x) \ + do { \ + if (SMC_MUST_ALIGN_WRITE(lp)) \ + SMC_outl((x)<<16, ioaddr, SMC_REG(lp, 8, 1)); \ + else \ + SMC_outw(x, ioaddr, GP_REG(lp)); \ + } while (0) + #define SMC_SET_MII(lp, x) SMC_outw(x, ioaddr, MII_REG(lp)) #define SMC_GET_MIR(lp) SMC_inw(ioaddr, MIR_REG(lp)) -- cgit v1.2.3 From 5742964e916269e01a3467d2bff2601180b7da3d Mon Sep 17 00:00:00 2001 From: Eric Miao Date: Mon, 19 Jan 2009 15:28:07 +0800 Subject: [ARM] pxa: remove unnecessary #include of pxa-regs.h and hardware.h pxa-regs.h and hardware.h are not intended for use directly in driver code, remove those unnecessary references. Signed-off-by: Eric Miao --- arch/arm/mach-pxa/cm-x2xx-pci.c | 1 - arch/arm/mach-pxa/himalaya.c | 2 -- arch/arm/mach-pxa/pwm.c | 1 - arch/arm/mach-pxa/ssp.c | 1 - drivers/input/keyboard/corgikbd.c | 2 -- drivers/input/keyboard/spitzkbd.c | 2 -- drivers/net/smc911x.h | 3 +-- drivers/net/smc91x.h | 2 -- drivers/pcmcia/pxa2xx_base.c | 1 - drivers/pcmcia/pxa2xx_cm_x255.c | 1 - drivers/pcmcia/pxa2xx_cm_x270.c | 1 - drivers/pcmcia/pxa2xx_e740.c | 2 -- drivers/pcmcia/pxa2xx_lubbock.c | 1 - drivers/pcmcia/pxa2xx_viper.c | 1 - drivers/video/pxafb.c | 1 - sound/arm/pxa2xx-ac97-lib.c | 1 - sound/arm/pxa2xx-ac97.c | 2 -- sound/arm/pxa2xx-pcm-lib.c | 3 +-- sound/soc/pxa/corgi.c | 2 -- sound/soc/pxa/e800_wm9712.c | 2 -- sound/soc/pxa/em-x270.c | 2 -- sound/soc/pxa/poodle.c | 2 -- sound/soc/pxa/spitz.c | 2 -- sound/soc/pxa/tosa.c | 2 -- 24 files changed, 2 insertions(+), 38 deletions(-) (limited to 'drivers/net/smc91x.h') diff --git a/arch/arm/mach-pxa/cm-x2xx-pci.c b/arch/arm/mach-pxa/cm-x2xx-pci.c index 3156b25f6e9d..7873fa3d8fa4 100644 --- a/arch/arm/mach-pxa/cm-x2xx-pci.c +++ b/arch/arm/mach-pxa/cm-x2xx-pci.c @@ -22,7 +22,6 @@ #include #include -#include #include #include diff --git a/arch/arm/mach-pxa/himalaya.c b/arch/arm/mach-pxa/himalaya.c index 00884e5a6042..cea99fe65b97 100644 --- a/arch/arm/mach-pxa/himalaya.c +++ b/arch/arm/mach-pxa/himalaya.c @@ -26,8 +26,6 @@ #include #include -#include -#include #include "generic.h" diff --git a/arch/arm/mach-pxa/pwm.c b/arch/arm/mach-pxa/pwm.c index 3ca7ffc6904b..fcdd374437a8 100644 --- a/arch/arm/mach-pxa/pwm.c +++ b/arch/arm/mach-pxa/pwm.c @@ -20,7 +20,6 @@ #include #include -#include /* PWM registers and bits definitions */ #define PWMCR (0x00) diff --git a/arch/arm/mach-pxa/ssp.c b/arch/arm/mach-pxa/ssp.c index 6f42004db3ed..965e38c6bafe 100644 --- a/arch/arm/mach-pxa/ssp.c +++ b/arch/arm/mach-pxa/ssp.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #define TIMEOUT 100000 diff --git a/drivers/input/keyboard/corgikbd.c b/drivers/input/keyboard/corgikbd.c index c8ed065ea0cb..529121be8a98 100644 --- a/drivers/input/keyboard/corgikbd.c +++ b/drivers/input/keyboard/corgikbd.c @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include diff --git a/drivers/input/keyboard/spitzkbd.c b/drivers/input/keyboard/spitzkbd.c index c48b76a46a58..9a7371c93b3f 100644 --- a/drivers/input/keyboard/spitzkbd.c +++ b/drivers/input/keyboard/spitzkbd.c @@ -21,8 +21,6 @@ #include #include -#include -#include #include #define KB_ROWS 7 diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h index 870b4c33f108..611584ee7a01 100644 --- a/drivers/net/smc911x.h +++ b/drivers/net/smc911x.h @@ -226,8 +226,7 @@ static inline void SMC_outsl(struct smc911x_local *lp, int reg, * Use a DMA for RX and TX packets. */ #include -#include -#include +#include static dma_addr_t rx_dmabuf, tx_dmabuf; static int rx_dmalen, tx_dmalen; diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h index c4ccd121bc9c..4d689b59c58c 100644 --- a/drivers/net/smc91x.h +++ b/drivers/net/smc91x.h @@ -494,8 +494,6 @@ struct smc_local { */ #include #include -#include -#include #ifdef SMC_insl #undef SMC_insl diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c index bb9ddb9532e3..0227691860ae 100644 --- a/drivers/pcmcia/pxa2xx_base.c +++ b/drivers/pcmcia/pxa2xx_base.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include diff --git a/drivers/pcmcia/pxa2xx_cm_x255.c b/drivers/pcmcia/pxa2xx_cm_x255.c index 7c8bcb476622..4ed64d8e95e7 100644 --- a/drivers/pcmcia/pxa2xx_cm_x255.c +++ b/drivers/pcmcia/pxa2xx_cm_x255.c @@ -16,7 +16,6 @@ #include #include -#include #include "soc_common.h" diff --git a/drivers/pcmcia/pxa2xx_cm_x270.c b/drivers/pcmcia/pxa2xx_cm_x270.c index 6c3aac377126..a7b943d01e34 100644 --- a/drivers/pcmcia/pxa2xx_cm_x270.c +++ b/drivers/pcmcia/pxa2xx_cm_x270.c @@ -16,7 +16,6 @@ #include #include -#include #include "soc_common.h" diff --git a/drivers/pcmcia/pxa2xx_e740.c b/drivers/pcmcia/pxa2xx_e740.c index f663a011bf4a..d09c0dc4a31a 100644 --- a/drivers/pcmcia/pxa2xx_e740.c +++ b/drivers/pcmcia/pxa2xx_e740.c @@ -16,8 +16,6 @@ #include #include -#include -#include #include #include diff --git a/drivers/pcmcia/pxa2xx_lubbock.c b/drivers/pcmcia/pxa2xx_lubbock.c index 37ec55df086e..6cbb1b1f7cfd 100644 --- a/drivers/pcmcia/pxa2xx_lubbock.c +++ b/drivers/pcmcia/pxa2xx_lubbock.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include "sa1111_generic.h" diff --git a/drivers/pcmcia/pxa2xx_viper.c b/drivers/pcmcia/pxa2xx_viper.c index dd10481be7bf..17871360fe99 100644 --- a/drivers/pcmcia/pxa2xx_viper.c +++ b/drivers/pcmcia/pxa2xx_viper.c @@ -26,7 +26,6 @@ #include -#include #include #include diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c index 48ff701d3a72..287aa1d2a13c 100644 --- a/drivers/video/pxafb.c +++ b/drivers/video/pxafb.c @@ -59,7 +59,6 @@ #include #include #include -#include #include #include diff --git a/sound/arm/pxa2xx-ac97-lib.c b/sound/arm/pxa2xx-ac97-lib.c index 35afd0c33be5..718d06640dd4 100644 --- a/sound/arm/pxa2xx-ac97-lib.c +++ b/sound/arm/pxa2xx-ac97-lib.c @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c index 85cf591d4e11..ccec48fc8e3f 100644 --- a/sound/arm/pxa2xx-ac97.c +++ b/sound/arm/pxa2xx-ac97.c @@ -20,8 +20,6 @@ #include #include -#include -#include #include #include diff --git a/sound/arm/pxa2xx-pcm-lib.c b/sound/arm/pxa2xx-pcm-lib.c index 75a0d746fb60..108b643229ba 100644 --- a/sound/arm/pxa2xx-pcm-lib.c +++ b/sound/arm/pxa2xx-pcm-lib.c @@ -12,8 +12,7 @@ #include #include -#include -#include +#include #include "pxa2xx-pcm.h" diff --git a/sound/soc/pxa/corgi.c b/sound/soc/pxa/corgi.c index 1ba25a559524..ec930667feff 100644 --- a/sound/soc/pxa/corgi.c +++ b/sound/soc/pxa/corgi.c @@ -25,8 +25,6 @@ #include #include -#include -#include #include #include diff --git a/sound/soc/pxa/e800_wm9712.c b/sound/soc/pxa/e800_wm9712.c index 2e3386dfa0f0..ac294c797b7d 100644 --- a/sound/soc/pxa/e800_wm9712.c +++ b/sound/soc/pxa/e800_wm9712.c @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include "../codecs/wm9712.h" diff --git a/sound/soc/pxa/em-x270.c b/sound/soc/pxa/em-x270.c index fe4a729ea648..949be9c2a01b 100644 --- a/sound/soc/pxa/em-x270.c +++ b/sound/soc/pxa/em-x270.c @@ -29,8 +29,6 @@ #include #include -#include -#include #include #include "../codecs/wm9712.h" diff --git a/sound/soc/pxa/poodle.c b/sound/soc/pxa/poodle.c index 6e9827189fff..cad2c4c0ac95 100644 --- a/sound/soc/pxa/poodle.c +++ b/sound/soc/pxa/poodle.c @@ -26,8 +26,6 @@ #include #include -#include -#include #include #include diff --git a/sound/soc/pxa/spitz.c b/sound/soc/pxa/spitz.c index a3b9e6bdf979..de8778fa8729 100644 --- a/sound/soc/pxa/spitz.c +++ b/sound/soc/pxa/spitz.c @@ -26,8 +26,6 @@ #include #include -#include -#include #include #include "../codecs/wm8750.h" #include "pxa2xx-pcm.h" diff --git a/sound/soc/pxa/tosa.c b/sound/soc/pxa/tosa.c index c77194f74c9b..050223d04e54 100644 --- a/sound/soc/pxa/tosa.c +++ b/sound/soc/pxa/tosa.c @@ -30,8 +30,6 @@ #include #include -#include -#include #include #include "../codecs/wm9712.h" -- cgit v1.2.3 From a6b993c6b5183fe2af98569cbb7dd8add01b8deb Mon Sep 17 00:00:00 2001 From: Eric Miao Date: Wed, 18 Feb 2009 16:38:22 +0800 Subject: [ARM] pxa/aspenite: add support for debug ethernet Signed-off-by: Zhangfei Gao Signed-off-by: Eric Miao --- arch/arm/mach-mmp/aspenite.c | 63 ++++++++++++++++++++++++++++++++++++++++++++ drivers/net/smc91x.h | 1 + 2 files changed, 64 insertions(+) (limited to 'drivers/net/smc91x.h') diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c index a9efa5cadbe8..4562452d4074 100644 --- a/arch/arm/mach-mmp/aspenite.c +++ b/arch/arm/mach-mmp/aspenite.c @@ -11,26 +11,89 @@ #include #include +#include +#include #include #include #include #include #include +#include #include "common.h" static unsigned long common_pin_config[] __initdata = { + /* Data Flash Interface */ + GPIO0_DFI_D15, + GPIO1_DFI_D14, + GPIO2_DFI_D13, + GPIO3_DFI_D12, + GPIO4_DFI_D11, + GPIO5_DFI_D10, + GPIO6_DFI_D9, + GPIO7_DFI_D8, + GPIO8_DFI_D7, + GPIO9_DFI_D6, + GPIO10_DFI_D5, + GPIO11_DFI_D4, + GPIO12_DFI_D3, + GPIO13_DFI_D2, + GPIO14_DFI_D1, + GPIO15_DFI_D0, + + /* Static Memory Controller */ + GPIO18_SMC_nCS0, + GPIO34_SMC_nCS1, + GPIO23_SMC_nLUA, + GPIO25_SMC_nLLA, + GPIO28_SMC_RDY, + GPIO29_SMC_SCLK, + GPIO35_SMC_BE1, + GPIO36_SMC_BE2, + GPIO27_GPIO, /* Ethernet IRQ */ + /* UART1 */ GPIO107_UART1_RXD, GPIO108_UART1_TXD, }; +static struct smc91x_platdata smc91x_info = { + .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, +}; + +static struct resource smc91x_resources[] = { + [0] = { + .start = SMC_CS1_PHYS_BASE + 0x300, + .end = SMC_CS1_PHYS_BASE + 0xfffff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = gpio_to_irq(27), + .end = gpio_to_irq(27), + .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, + } +}; + +static struct platform_device smc91x_device = { + .name = "smc91x", + .id = 0, + .dev = { + .platform_data = &smc91x_info, + }, + .num_resources = ARRAY_SIZE(smc91x_resources), + .resource = smc91x_resources, +}; + static void __init common_init(void) { mfp_config(ARRAY_AND_SIZE(common_pin_config)); + /* on-chip devices */ pxa168_add_uart(1); + + /* off-chip devices */ + platform_device_register(&smc91x_device); } MACHINE_START(ASPENITE, "PXA168-based Aspenite Development Platform") diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h index 4d689b59c58c..1083e2c5dec6 100644 --- a/drivers/net/smc91x.h +++ b/drivers/net/smc91x.h @@ -44,6 +44,7 @@ defined(CONFIG_MACH_MAINSTONE) ||\ defined(CONFIG_MACH_ZYLONITE) ||\ defined(CONFIG_MACH_LITTLETON) ||\ + defined(CONFIG_MACH_ZYLONITE2) ||\ defined(CONFIG_ARCH_VIPER) #include -- cgit v1.2.3 From 91e8a30e90144bcd0fead02dc57976f304c3b3f7 Mon Sep 17 00:00:00 2001 From: Manuel Lauss Date: Wed, 25 Mar 2009 17:49:31 +0100 Subject: MIPS: Alchemy: PB1200: use SMC91X platform data. Add platform data for the smc91x on the PB1200/DB1200, and remove the now unused AU1X00 entry in smc91x.h. Signed-off-by: Manuel Lauss --- arch/mips/alchemy/devboards/pb1200/platform.c | 10 +++++++++ drivers/net/smc91x.h | 32 --------------------------- 2 files changed, 10 insertions(+), 32 deletions(-) (limited to 'drivers/net/smc91x.h') diff --git a/arch/mips/alchemy/devboards/pb1200/platform.c b/arch/mips/alchemy/devboards/pb1200/platform.c index 95303297c534..0d68e1985ffd 100644 --- a/arch/mips/alchemy/devboards/pb1200/platform.c +++ b/arch/mips/alchemy/devboards/pb1200/platform.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -131,6 +132,12 @@ static struct platform_device ide_device = { .resource = ide_resources }; +static struct smc91x_platdata smc_data = { + .flags = SMC91X_NOWAIT | SMC91X_USE_16BIT, + .leda = RPC_LED_100_10, + .ledb = RPC_LED_TX_RX, +}; + static struct resource smc91c111_resources[] = { [0] = { .name = "smc91x-regs", @@ -146,6 +153,9 @@ static struct resource smc91c111_resources[] = { }; static struct platform_device smc91c111_device = { + .dev = { + .platform_data = &smc_data, + }, .name = "smc91x", .id = -1, .num_resources = ARRAY_SIZE(smc91c111_resources), diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h index 6c44f86ae3fd..912308eec865 100644 --- a/drivers/net/smc91x.h +++ b/drivers/net/smc91x.h @@ -346,38 +346,6 @@ static inline void LPD7_SMC_outsw (unsigned char* a, int r, #define RPC_LSA_DEFAULT RPC_LED_TX_RX #define RPC_LSB_DEFAULT RPC_LED_100_10 -#elif defined(CONFIG_SOC_AU1X00) - -#include - -/* We can only do 16-bit reads and writes in the static memory space. */ -#define SMC_CAN_USE_8BIT 0 -#define SMC_CAN_USE_16BIT 1 -#define SMC_CAN_USE_32BIT 0 -#define SMC_IO_SHIFT 0 -#define SMC_NOWAIT 1 - -#define SMC_inw(a, r) au_readw((unsigned long)((a) + (r))) -#define SMC_insw(a, r, p, l) \ - do { \ - unsigned long _a = (unsigned long)((a) + (r)); \ - int _l = (l); \ - u16 *_p = (u16 *)(p); \ - while (_l-- > 0) \ - *_p++ = au_readw(_a); \ - } while(0) -#define SMC_outw(v, a, r) au_writew(v, (unsigned long)((a) + (r))) -#define SMC_outsw(a, r, p, l) \ - do { \ - unsigned long _a = (unsigned long)((a) + (r)); \ - int _l = (l); \ - const u16 *_p = (const u16 *)(p); \ - while (_l-- > 0) \ - au_writew(*_p++ , _a); \ - } while(0) - -#define SMC_IRQ_FLAGS (0) - #elif defined(CONFIG_ARCH_VERSATILE) #define SMC_CAN_USE_8BIT 1 -- cgit v1.2.3