linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Enable Fast Ethernet on Aspenite.
       [not found] <1280849830-5350-1-git-send-email-ssanap@marvell.com>
@ 2010-08-03 11:09 ` Eric Miao
       [not found] ` <1280849830-5350-2-git-send-email-ssanap@marvell.com>
  1 sibling, 0 replies; 6+ messages in thread
From: Eric Miao @ 2010-08-03 11:09 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Aug 3, 2010 at 11:37 PM, Sachin Sanap <ssanap@marvell.com> wrote:
> Following is the series of 3 patches that will help get the Fast Ethernet
> driver functional on PXA168 based Aspenite boards.Same driver can be used
> for other PXA168 based boards as well but that will come later.First patch
> adds MAX7312, second patch adds the necessary MFU pins, and third adds
> ethernet specific initializations.
>

Cc'ed Zhangfei.

> These patches were generated against 2.6.35-rc5
> commit cd5b8f8755a89a57fc8c408d284b8b613f090345
>
>
> Sachin Sanap (3):
> ?[ARM] pxa: Hookup MAX7312 thats connected to I2C.
> ?[ARM] pxa: MFU pin configuration to support Fast ethernet.
> ?[ARM] pxa: Add support for Fast Ethernet driver.
>
> ?arch/arm/mach-mmp/aspenite.c ? ? ? ? ? ? ? ?| ? 83 ++++++++++++++++++++++++++-
> ?arch/arm/mach-mmp/include/mach/devices.h ? ?| ? ?1 +
> ?arch/arm/mach-mmp/include/mach/mfp-pxa168.h | ? 19 ++++++
> ?arch/arm/mach-mmp/include/mach/pxa168.h ? ? | ? ?9 +++
> ?arch/arm/mach-mmp/include/mach/regs-apmu.h ?| ? ?1 +
> ?arch/arm/mach-mmp/pxa168.c ? ? ? ? ? ? ? ? ?| ? ?3 +
> ?6 files changed, 114 insertions(+), 2 deletions(-)
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 3/3] [ARM] pxa: Add support for Fast Ethernet driver.
       [not found]     ` <1280849830-5350-4-git-send-email-ssanap@marvell.com>
@ 2010-08-03 11:13       ` Eric Miao
  2010-08-03 11:17         ` Sachin Sanap
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Miao @ 2010-08-03 11:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Aug 3, 2010 at 11:37 PM, Sachin Sanap <ssanap@marvell.com> wrote:
> In order to make this patch compile, even if the PXA168 ethernet driver
> with it's header defining the platform data isn't merged yet, ifdefs
> have been added. Its effect is that the function results in a no-op
> function if the driver hasn't been activated.
>
> These ifdefs can be removed after the Ethernet driver has been merged.
>

I'd rather this be posted after the ethernet driver is merged, which
is going to happen in netdev mailing list. What's the status of that
driver being upstream by the way?

> Signed-off-by: Sachin Sanap <ssanap@marvell.com>
> ---
> ?arch/arm/mach-mmp/aspenite.c ? ? ? ? ? ? ? | ? 34 ++++++++++++++++++++++++++++
> ?arch/arm/mach-mmp/include/mach/devices.h ? | ? ?1 +
> ?arch/arm/mach-mmp/include/mach/pxa168.h ? ?| ? ?9 +++++++
> ?arch/arm/mach-mmp/include/mach/regs-apmu.h | ? ?1 +
> ?arch/arm/mach-mmp/pxa168.c ? ? ? ? ? ? ? ? | ? ?3 ++
> ?5 files changed, 48 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c
> index a235551..40f88ba 100644
> --- a/arch/arm/mach-mmp/aspenite.c
> +++ b/arch/arm/mach-mmp/aspenite.c
> @@ -24,10 +24,15 @@
> ?#include <mach/pxa168.h>
> ?#include <mach/gpio.h>
> ?#include <linux/i2c/pca953x.h>
> +#if defined(CONFIG_PXA168_ETH) || defined(CONFIG_PXA168_ETH_MODULE)
> +#include <mach/pxa168_eth.h>
> +#endif
>
> ?#include "common.h"
>
> ?#define GPIO_EXT1(x) ? (128 + 16 + (x))
> +#define ENET_RESET_N ? GPIO_EXT1(9)
> +#define ENET_COMA_N ? ?GPIO_EXT1(10)
>
> ?static unsigned long common_pin_config[] __initdata = {
> ? ? ? ?/* Data Flash Interface */
> @@ -177,7 +182,33 @@ static struct i2c_board_info aspenite_i2c_info[] __initdata = {
> ? ? ? ?},
> ?#endif
> ?};
> +#if defined(CONFIG_PXA168_ETH) || defined(CONFIG_PXA168_ETH_MODULE)
> +static int pxa168_eth_init(void)
> +{
> + ? ? ? if (gpio_request(ENET_RESET_N, "ENET_RESET_N")) {
> + ? ? ? ? ? ? ? printk(KERN_ERR "Request GPIO failed,"
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? "gpio: %d\n", ENET_RESET_N);
> + ? ? ? ? ? ? ? return -EIO;
> + ? ? ? }
> + ? ? ? if (gpio_request(ENET_COMA_N, "ENET_COMA_N")) {
> + ? ? ? ? ? ? ? gpio_free(ENET_RESET_N);
> + ? ? ? ? ? ? ? printk(KERN_ERR "Request GPIO failed,"
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? "gpio: %d\n", ENET_COMA_N);
> + ? ? ? ? ? ? ? return -EIO;
> + ? ? ? }
> + ? ? ? gpio_direction_output(ENET_RESET_N, 1);
> + ? ? ? gpio_direction_output(ENET_COMA_N, 1);
> + ? ? ? gpio_free(ENET_RESET_N);
> + ? ? ? gpio_free(ENET_COMA_N);
> + ? ? ? return 0;
> +}
>
> +static struct pxa168_eth_platform_data pxa168_eth_data = {
> + ? ? ? .phy_addr = 0, ? ? ? ? ?/* phy addr depends on boards */
> + ? ? ? .port_number = 0,
> + ? ? ? .init ? = pxa168_eth_init,
> +};
> +#endif
> ?static void __init common_init(void)
> ?{
> ? ? ? ?mfp_config(ARRAY_AND_SIZE(common_pin_config));
> @@ -188,6 +219,9 @@ static void __init common_init(void)
> ? ? ? ?pxa168_add_twsi(1, NULL, ARRAY_AND_SIZE(aspenite_pwri2c_info));
> ? ? ? ?pxa168_add_ssp(1);
> ? ? ? ?pxa168_add_nand(&aspenite_nand_info);
> +#if defined(CONFIG_PXA168_ETH) || defined(CONFIG_PXA168_ETH_MODULE)
> + ? ? ? pxa168_add_mfu(&pxa168_eth_data);
> +#endif
>
> ? ? ? ?/* off-chip devices */
> ? ? ? ?platform_device_register(&smc91x_device);
> diff --git a/arch/arm/mach-mmp/include/mach/devices.h b/arch/arm/mach-mmp/include/mach/devices.h
> index 1fa0a49..0cc0333 100644
> --- a/arch/arm/mach-mmp/include/mach/devices.h
> +++ b/arch/arm/mach-mmp/include/mach/devices.h
> @@ -46,4 +46,5 @@ struct pxa_device_desc mmp2_device_##_name __initdata = { ? ? ? ? ? ? \
> ? ? ? ?.dma ? ? ? ? ? ?= { _dma }, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? \
> ?}
>
> +extern struct pxa_device_desc pxa168_device_mfu;
> ?extern int pxa_register_device(struct pxa_device_desc *, void *, size_t);
> diff --git a/arch/arm/mach-mmp/include/mach/pxa168.h b/arch/arm/mach-mmp/include/mach/pxa168.h
> index 3b2bd5d..0e2ff24 100644
> --- a/arch/arm/mach-mmp/include/mach/pxa168.h
> +++ b/arch/arm/mach-mmp/include/mach/pxa168.h
> @@ -5,6 +5,9 @@
> ?#include <mach/devices.h>
> ?#include <plat/i2c.h>
> ?#include <plat/pxa3xx_nand.h>
> +#if defined(CONFIG_PXA168_ETH) || defined(CONFIG_PXA168_ETH_MODULE)
> +#include <mach/pxa168_eth.h>
> +#endif
>
> ?extern struct pxa_device_desc pxa168_device_uart1;
> ?extern struct pxa_device_desc pxa168_device_uart2;
> @@ -92,4 +95,10 @@ static inline int pxa168_add_nand(struct pxa3xx_nand_platform_data *info)
> ?{
> ? ? ? ?return pxa_register_device(&pxa168_device_nand, info, sizeof(*info));
> ?}
> +#if defined(CONFIG_PXA168_ETH) || defined(CONFIG_PXA168_ETH_MODULE)
> +static inline int pxa168_add_mfu(struct pxa168_eth_platform_data *data)
> +{
> + ? ? ? return pxa_register_device(&pxa168_device_mfu, data, sizeof(*data));
> +}
> +#endif
> ?#endif /* __ASM_MACH_PXA168_H */
> diff --git a/arch/arm/mach-mmp/include/mach/regs-apmu.h b/arch/arm/mach-mmp/include/mach/regs-apmu.h
> index 9190305..47b2ea6 100644
> --- a/arch/arm/mach-mmp/include/mach/regs-apmu.h
> +++ b/arch/arm/mach-mmp/include/mach/regs-apmu.h
> @@ -27,6 +27,7 @@
> ?#define APMU_DMA ? ? ? APMU_REG(0x064)
> ?#define APMU_GEU ? ? ? APMU_REG(0x068)
> ?#define APMU_BUS ? ? ? APMU_REG(0x06c)
> +#define APMU_MFU ? ? ? APMU_REG(0x0fc)
>
> ?#define APMU_FNCLK_EN ?(1 << 4)
> ?#define APMU_AXICLK_EN (1 << 3)
> diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c
> index 652ae66..f7d1158 100644
> --- a/arch/arm/mach-mmp/pxa168.c
> +++ b/arch/arm/mach-mmp/pxa168.c
> @@ -79,6 +79,7 @@ static APBC_CLK(ssp4, PXA168_SSP4, 4, 0);
> ?static APBC_CLK(ssp5, PXA168_SSP5, 4, 0);
>
> ?static APMU_CLK(nand, NAND, 0x01db, 208000000);
> +static APMU_CLK(mfu, MFU, 0x9, 0);
>
> ?/* device and clock bindings */
> ?static struct clk_lookup pxa168_clkregs[] = {
> @@ -96,6 +97,7 @@ static struct clk_lookup pxa168_clkregs[] = {
> ? ? ? ?INIT_CLKREG(&clk_ssp4, "pxa168-ssp.3", NULL),
> ? ? ? ?INIT_CLKREG(&clk_ssp5, "pxa168-ssp.4", NULL),
> ? ? ? ?INIT_CLKREG(&clk_nand, "pxa3xx-nand", NULL),
> + ? ? ? INIT_CLKREG(&clk_mfu, "pxa168-mfu", "MFUCLK"),
> ?};
>
> ?static int __init pxa168_init(void)
> @@ -147,3 +149,4 @@ PXA168_DEVICE(ssp2, "pxa168-ssp", 1, SSP2, 0xd401c000, 0x40, 54, 55);
> ?PXA168_DEVICE(ssp3, "pxa168-ssp", 2, SSP3, 0xd401f000, 0x40, 56, 57);
> ?PXA168_DEVICE(ssp4, "pxa168-ssp", 3, SSP4, 0xd4020000, 0x40, 58, 59);
> ?PXA168_DEVICE(ssp5, "pxa168-ssp", 4, SSP5, 0xd4021000, 0x40, 60, 61);
> +PXA168_DEVICE(mfu, "pxa168-mfu", -1, MFU, 0xc0800000, 0x0fff);
> --
> 1.6.2.5
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 3/3] [ARM] pxa: Add support for Fast Ethernet driver.
  2010-08-03 11:13       ` [PATCH 3/3] [ARM] pxa: Add support for Fast Ethernet driver Eric Miao
@ 2010-08-03 11:17         ` Sachin Sanap
  0 siblings, 0 replies; 6+ messages in thread
From: Sachin Sanap @ 2010-08-03 11:17 UTC (permalink / raw)
  To: linux-arm-kernel


> 
> On Tue, Aug 3, 2010 at 11:37 PM, Sachin Sanap <ssanap@marvell.com> wrote:
> > In order to make this patch compile, even if the PXA168 ethernet driver
> > with it's header defining the platform data isn't merged yet, ifdefs
> > have been added. Its effect is that the function results in a no-op
> > function if the driver hasn't been activated.
> >
> > These ifdefs can be removed after the Ethernet driver has been merged.
> >
> 
> I'd rather this be posted after the ethernet driver is merged, which
> is going to happen in netdev mailing list. What's the status of that
> driver being upstream by the way?

Iam posting it soon in another couple of hours.

> 
> > Signed-off-by: Sachin Sanap <ssanap@marvell.com>
> > ---
> > ?arch/arm/mach-mmp/aspenite.c ? ? ? ? ? ? ? | ? 34
> ++++++++++++++++++++++++++++
> > ?arch/arm/mach-mmp/include/mach/devices.h ? | ? ?1 +
> > ?arch/arm/mach-mmp/include/mach/pxa168.h ? ?| ? ?9 +++++++
> > ?arch/arm/mach-mmp/include/mach/regs-apmu.h | ? ?1 +
> > ?arch/arm/mach-mmp/pxa168.c ? ? ? ? ? ? ? ? | ? ?3 ++
> > ?5 files changed, 48 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c
> > index a235551..40f88ba 100644
> > --- a/arch/arm/mach-mmp/aspenite.c
> > +++ b/arch/arm/mach-mmp/aspenite.c
> > @@ -24,10 +24,15 @@
> > ?#include <mach/pxa168.h>
> > ?#include <mach/gpio.h>
> > ?#include <linux/i2c/pca953x.h>
> > +#if defined(CONFIG_PXA168_ETH) || defined(CONFIG_PXA168_ETH_MODULE)
> > +#include <mach/pxa168_eth.h>
> > +#endif
> >
> > ?#include "common.h"
> >
> > ?#define GPIO_EXT1(x) ? (128 + 16 + (x))
> > +#define ENET_RESET_N ? GPIO_EXT1(9)
> > +#define ENET_COMA_N ? ?GPIO_EXT1(10)
> >
> > ?static unsigned long common_pin_config[] __initdata = {
> > ? ? ? ?/* Data Flash Interface */
> > @@ -177,7 +182,33 @@ static struct i2c_board_info aspenite_i2c_info[]
> __initdata = {
> > ? ? ? ?},
> > ?#endif
> > ?};
> > +#if defined(CONFIG_PXA168_ETH) || defined(CONFIG_PXA168_ETH_MODULE)
> > +static int pxa168_eth_init(void)
> > +{
> > + ? ? ? if (gpio_request(ENET_RESET_N, "ENET_RESET_N")) {
> > + ? ? ? ? ? ? ? printk(KERN_ERR "Request GPIO failed,"
> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? "gpio: %d\n", ENET_RESET_N);
> > + ? ? ? ? ? ? ? return -EIO;
> > + ? ? ? }
> > + ? ? ? if (gpio_request(ENET_COMA_N, "ENET_COMA_N")) {
> > + ? ? ? ? ? ? ? gpio_free(ENET_RESET_N);
> > + ? ? ? ? ? ? ? printk(KERN_ERR "Request GPIO failed,"
> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? "gpio: %d\n", ENET_COMA_N);
> > + ? ? ? ? ? ? ? return -EIO;
> > + ? ? ? }
> > + ? ? ? gpio_direction_output(ENET_RESET_N, 1);
> > + ? ? ? gpio_direction_output(ENET_COMA_N, 1);
> > + ? ? ? gpio_free(ENET_RESET_N);
> > + ? ? ? gpio_free(ENET_COMA_N);
> > + ? ? ? return 0;
> > +}
> >
> > +static struct pxa168_eth_platform_data pxa168_eth_data = {
> > + ? ? ? .phy_addr = 0, ? ? ? ? ?/* phy addr depends on boards */
> > + ? ? ? .port_number = 0,
> > + ? ? ? .init ? = pxa168_eth_init,
> > +};
> > +#endif
> > ?static void __init common_init(void)
> > ?{
> > ? ? ? ?mfp_config(ARRAY_AND_SIZE(common_pin_config));
> > @@ -188,6 +219,9 @@ static void __init common_init(void)
> > ? ? ? ?pxa168_add_twsi(1, NULL, ARRAY_AND_SIZE(aspenite_pwri2c_info));
> > ? ? ? ?pxa168_add_ssp(1);
> > ? ? ? ?pxa168_add_nand(&aspenite_nand_info);
> > +#if defined(CONFIG_PXA168_ETH) || defined(CONFIG_PXA168_ETH_MODULE)
> > + ? ? ? pxa168_add_mfu(&pxa168_eth_data);
> > +#endif
> >
> > ? ? ? ?/* off-chip devices */
> > ? ? ? ?platform_device_register(&smc91x_device);
> > diff --git a/arch/arm/mach-mmp/include/mach/devices.h b/arch/arm/mach-
> mmp/include/mach/devices.h
> > index 1fa0a49..0cc0333 100644
> > --- a/arch/arm/mach-mmp/include/mach/devices.h
> > +++ b/arch/arm/mach-mmp/include/mach/devices.h
> > @@ -46,4 +46,5 @@ struct pxa_device_desc mmp2_device_##_name __initdata
> = { ? ? ? ? ? ? \
> > ? ? ? ?.dma ? ? ? ? ? ?= { _dma }, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? \
> > ?}
> >
> > +extern struct pxa_device_desc pxa168_device_mfu;
> > ?extern int pxa_register_device(struct pxa_device_desc *, void *,
> size_t);
> > diff --git a/arch/arm/mach-mmp/include/mach/pxa168.h b/arch/arm/mach-
> mmp/include/mach/pxa168.h
> > index 3b2bd5d..0e2ff24 100644
> > --- a/arch/arm/mach-mmp/include/mach/pxa168.h
> > +++ b/arch/arm/mach-mmp/include/mach/pxa168.h
> > @@ -5,6 +5,9 @@
> > ?#include <mach/devices.h>
> > ?#include <plat/i2c.h>
> > ?#include <plat/pxa3xx_nand.h>
> > +#if defined(CONFIG_PXA168_ETH) || defined(CONFIG_PXA168_ETH_MODULE)
> > +#include <mach/pxa168_eth.h>
> > +#endif
> >
> > ?extern struct pxa_device_desc pxa168_device_uart1;
> > ?extern struct pxa_device_desc pxa168_device_uart2;
> > @@ -92,4 +95,10 @@ static inline int pxa168_add_nand(struct
> pxa3xx_nand_platform_data *info)
> > ?{
> > ? ? ? ?return pxa_register_device(&pxa168_device_nand, info,
> sizeof(*info));
> > ?}
> > +#if defined(CONFIG_PXA168_ETH) || defined(CONFIG_PXA168_ETH_MODULE)
> > +static inline int pxa168_add_mfu(struct pxa168_eth_platform_data *data)
> > +{
> > + ? ? ? return pxa_register_device(&pxa168_device_mfu, data,
> sizeof(*data));
> > +}
> > +#endif
> > ?#endif /* __ASM_MACH_PXA168_H */
> > diff --git a/arch/arm/mach-mmp/include/mach/regs-apmu.h b/arch/arm/mach-
> mmp/include/mach/regs-apmu.h
> > index 9190305..47b2ea6 100644
> > --- a/arch/arm/mach-mmp/include/mach/regs-apmu.h
> > +++ b/arch/arm/mach-mmp/include/mach/regs-apmu.h
> > @@ -27,6 +27,7 @@
> > ?#define APMU_DMA ? ? ? APMU_REG(0x064)
> > ?#define APMU_GEU ? ? ? APMU_REG(0x068)
> > ?#define APMU_BUS ? ? ? APMU_REG(0x06c)
> > +#define APMU_MFU ? ? ? APMU_REG(0x0fc)
> >
> > ?#define APMU_FNCLK_EN ?(1 << 4)
> > ?#define APMU_AXICLK_EN (1 << 3)
> > diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c
> > index 652ae66..f7d1158 100644
> > --- a/arch/arm/mach-mmp/pxa168.c
> > +++ b/arch/arm/mach-mmp/pxa168.c
> > @@ -79,6 +79,7 @@ static APBC_CLK(ssp4, PXA168_SSP4, 4, 0);
> > ?static APBC_CLK(ssp5, PXA168_SSP5, 4, 0);
> >
> > ?static APMU_CLK(nand, NAND, 0x01db, 208000000);
> > +static APMU_CLK(mfu, MFU, 0x9, 0);
> >
> > ?/* device and clock bindings */
> > ?static struct clk_lookup pxa168_clkregs[] = {
> > @@ -96,6 +97,7 @@ static struct clk_lookup pxa168_clkregs[] = {
> > ? ? ? ?INIT_CLKREG(&clk_ssp4, "pxa168-ssp.3", NULL),
> > ? ? ? ?INIT_CLKREG(&clk_ssp5, "pxa168-ssp.4", NULL),
> > ? ? ? ?INIT_CLKREG(&clk_nand, "pxa3xx-nand", NULL),
> > + ? ? ? INIT_CLKREG(&clk_mfu, "pxa168-mfu", "MFUCLK"),
> > ?};
> >
> > ?static int __init pxa168_init(void)
> > @@ -147,3 +149,4 @@ PXA168_DEVICE(ssp2, "pxa168-ssp", 1, SSP2,
> 0xd401c000, 0x40, 54, 55);
> > ?PXA168_DEVICE(ssp3, "pxa168-ssp", 2, SSP3, 0xd401f000, 0x40, 56, 57);
> > ?PXA168_DEVICE(ssp4, "pxa168-ssp", 3, SSP4, 0xd4020000, 0x40, 58, 59);
> > ?PXA168_DEVICE(ssp5, "pxa168-ssp", 4, SSP5, 0xd4021000, 0x40, 60, 61);
> > +PXA168_DEVICE(mfu, "pxa168-mfu", -1, MFU, 0xc0800000, 0x0fff);
> > --
> > 1.6.2.5
> >
> >

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/3] [ARM] pxa: Hookup MAX7312 thats connected to I2C.
       [not found] ` <1280849830-5350-2-git-send-email-ssanap@marvell.com>
@ 2010-08-03 11:21   ` Eric Miao
       [not found]   ` <1280849830-5350-3-git-send-email-ssanap@marvell.com>
  1 sibling, 0 replies; 6+ messages in thread
From: Eric Miao @ 2010-08-03 11:21 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Aug 3, 2010 at 11:37 PM, Sachin Sanap <ssanap@marvell.com> wrote:
> Signed-off-by: Sachin Sanap <ssanap@marvell.com>
> ---
> ?arch/arm/mach-mmp/aspenite.c | ? 31 +++++++++++++++++++++++++++++--
> ?1 files changed, 29 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c
> index 244655d..d19c26c 100644
> --- a/arch/arm/mach-mmp/aspenite.c
> +++ b/arch/arm/mach-mmp/aspenite.c
> @@ -23,9 +23,12 @@
> ?#include <mach/mfp-pxa168.h>
> ?#include <mach/pxa168.h>
> ?#include <mach/gpio.h>
> +#include <linux/i2c/pca953x.h>
>
> ?#include "common.h"
>
> +#define GPIO_EXT1(x) ? (128 + 16 + (x))
> +
> ?static unsigned long common_pin_config[] __initdata = {
> ? ? ? ?/* Data Flash Interface */
> ? ? ? ?GPIO0_DFI_D15,
> @@ -66,6 +69,11 @@ static unsigned long common_pin_config[] __initdata = {
> ? ? ? ?GPIO115_I2S_BCLK,
> ? ? ? ?GPIO116_I2S_RXD,
> ? ? ? ?GPIO117_I2S_TXD,
> +
> + ? ? ? /* i2c bus */
> + ? ? ? GPIO105_CI2C_SDA,
> + ? ? ? GPIO106_CI2C_SCL,
> +
> ?};
>
> ?static struct smc91x_platdata smc91x_info = {
> @@ -130,17 +138,36 @@ static struct pxa3xx_nand_platform_data aspenite_nand_info = {
> ? ? ? ?.nr_parts ? ? ? = ARRAY_SIZE(aspenite_nand_partitions),
> ?};
>
> -static struct i2c_board_info aspenite_i2c_info[] __initdata = {
> +#if defined(CONFIG_GPIO_PCA953X)
> +static struct pca953x_platform_data max7312_data[] = {
> + ? ? ? [0] = {
> + ? ? ? ? ? ? ? .gpio_base ? ? ?= GPIO_EXT1(0),
> + ? ? ? },
> +};
> +#endif
> +
> +static struct i2c_board_info aspenite_pwri2c_info[] __initdata = {
> ? ? ? ?{ I2C_BOARD_INFO("wm8753", 0x1b), },
> ?};
>
> +static struct i2c_board_info aspenite_i2c_info[] __initdata = {
> +#if defined(CONFIG_GPIO_PCA953X)

correct form will be

#if defined(CONFIG_GPIO_PCA953X) || defined(CONFIG_GPIO_PCA953X_MODULE)

yet I doubt that's adding too much benefit except for saving
several bytes here. So I'd rather we don't introduce the #ifdef
here.

Otherwise looks good to me.

> + ? ? ? {
> + ? ? ? ? ? ? ? I2C_BOARD_INFO("max7312", 0x20),
> + ? ? ? ? ? ? ? .irq = IRQ_GPIO(120),
> + ? ? ? ? ? ? ? .platform_data ?= &max7312_data[0],
> + ? ? ? },
> +#endif
> +};
> +
> ?static void __init common_init(void)
> ?{
> ? ? ? ?mfp_config(ARRAY_AND_SIZE(common_pin_config));
>
> ? ? ? ?/* on-chip devices */
> ? ? ? ?pxa168_add_uart(1);
> - ? ? ? pxa168_add_twsi(1, NULL, ARRAY_AND_SIZE(aspenite_i2c_info));
> + ? ? ? pxa168_add_twsi(0, NULL, ARRAY_AND_SIZE(aspenite_i2c_info));
> + ? ? ? pxa168_add_twsi(1, NULL, ARRAY_AND_SIZE(aspenite_pwri2c_info));
> ? ? ? ?pxa168_add_ssp(1);
> ? ? ? ?pxa168_add_nand(&aspenite_nand_info);
>
> --
> 1.6.2.5
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/3] [ARM] pxa: MFU pin configuration to support Fast ethernet.
       [not found]   ` <1280849830-5350-3-git-send-email-ssanap@marvell.com>
       [not found]     ` <1280849830-5350-4-git-send-email-ssanap@marvell.com>
@ 2010-08-03 11:21     ` Eric Miao
  1 sibling, 0 replies; 6+ messages in thread
From: Eric Miao @ 2010-08-03 11:21 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Aug 3, 2010 at 11:37 PM, Sachin Sanap <ssanap@marvell.com> wrote:
> Signed-off-by: Sachin Sanap <ssanap@marvell.com>

This one looks good.

> ---
> ?arch/arm/mach-mmp/aspenite.c ? ? ? ? ? ? ? ?| ? 18 ++++++++++++++++++
> ?arch/arm/mach-mmp/include/mach/mfp-pxa168.h | ? 19 +++++++++++++++++++
> ?2 files changed, 37 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c
> index d19c26c..a235551 100644
> --- a/arch/arm/mach-mmp/aspenite.c
> +++ b/arch/arm/mach-mmp/aspenite.c
> @@ -74,6 +74,24 @@ static unsigned long common_pin_config[] __initdata = {
> ? ? ? ?GPIO105_CI2C_SDA,
> ? ? ? ?GPIO106_CI2C_SCL,
>
> + ? ? ? /* MFU */
> + ? ? ? GPIO86_TX_CLK,
> + ? ? ? GPIO87_TX_EN,
> + ? ? ? GPIO88_TX_DQ3,
> + ? ? ? GPIO89_TX_DQ2,
> + ? ? ? GPIO90_TX_DQ1,
> + ? ? ? GPIO91_TX_DQ0,
> + ? ? ? GPIO92_MII_CRS,
> + ? ? ? GPIO93_MII_COL,
> + ? ? ? GPIO94_RX_CLK,
> + ? ? ? GPIO95_RX_ER,
> + ? ? ? GPIO96_RX_DQ3,
> + ? ? ? GPIO97_RX_DQ2,
> + ? ? ? GPIO98_RX_DQ1,
> + ? ? ? GPIO99_RX_DQ0,
> + ? ? ? GPIO100_MII_MDC,
> + ? ? ? GPIO101_MII_MDIO,
> + ? ? ? GPIO103_RX_DV,
> ?};
>
> ?static struct smc91x_platdata smc91x_info = {
> diff --git a/arch/arm/mach-mmp/include/mach/mfp-pxa168.h b/arch/arm/mach-mmp/include/mach/mfp-pxa168.h
> index ded43c4..afea9dc 100644
> --- a/arch/arm/mach-mmp/include/mach/mfp-pxa168.h
> +++ b/arch/arm/mach-mmp/include/mach/mfp-pxa168.h
> @@ -266,6 +266,25 @@
> ?#define GPIO116_I2S_RXD ? ? ? ? ? ? ? ?MFP_CFG(GPIO116,AF2)
> ?#define GPIO117_I2S_TXD ? ? ? ? ? ? ? ?MFP_CFG(GPIO117,AF2)
>
> +/* MFU */
> +#define GPIO86_TX_CLK ? ? ? ? ?MFP_CFG(GPIO86, AF5)
> +#define GPIO87_TX_EN ? ? ? ? ? MFP_CFG(GPIO87, AF5)
> +#define GPIO88_TX_DQ3 ? ? ? ? ?MFP_CFG(GPIO88, AF5)
> +#define GPIO89_TX_DQ2 ? ? ? ? ?MFP_CFG(GPIO89, AF5)
> +#define GPIO90_TX_DQ1 ? ? ? ? ?MFP_CFG(GPIO90, AF5)
> +#define GPIO91_TX_DQ0 ? ? ? ? ?MFP_CFG(GPIO91, AF5)
> +#define GPIO92_MII_CRS ? ? ? ? MFP_CFG(GPIO92, AF5)
> +#define GPIO93_MII_COL ? ? ? ? MFP_CFG(GPIO93, AF5)
> +#define GPIO94_RX_CLK ? ? ? ? ?MFP_CFG(GPIO94, AF5)
> +#define GPIO95_RX_ER ? ? ? ? ? MFP_CFG(GPIO95, AF5)
> +#define GPIO96_RX_DQ3 ? ? ? ? ?MFP_CFG(GPIO96, AF5)
> +#define GPIO97_RX_DQ2 ? ? ? ? ?MFP_CFG(GPIO97, AF5)
> +#define GPIO98_RX_DQ1 ? ? ? ? ?MFP_CFG(GPIO98, AF5)
> +#define GPIO99_RX_DQ0 ? ? ? ? ?MFP_CFG(GPIO99, AF5)
> +#define GPIO100_MII_MDC ? ? ? ? ? ? ? ?MFP_CFG(GPIO100, AF5)
> +#define GPIO101_MII_MDIO ? ? ? MFP_CFG(GPIO101, AF5)
> +#define GPIO103_RX_DV ? ? ? ? ?MFP_CFG(GPIO103, AF5)
> +
> ?/* PWM */
> ?#define GPIO96_PWM3_OUT ? ? ? ? ? ? ? ?MFP_CFG(GPIO96, AF1)
> ?#define GPIO97_PWM2_OUT ? ? ? ? ? ? ? ?MFP_CFG(GPIO97, AF1)
> --
> 1.6.2.5
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 0/3] Enable Fast Ethernet on Aspenite.
@ 2010-08-25  9:17 Sachin Sanap
  0 siblings, 0 replies; 6+ messages in thread
From: Sachin Sanap @ 2010-08-25  9:17 UTC (permalink / raw)
  To: linux-arm-kernel


Since the PXA168 Fast Ethernet driver is now in upstream, following is the 
series of 3 patches that will help get the Fast Ethernet driver functional 
on PXA168 based Aspenite boards.First patch adds MAX7312, second patch adds 
the necessary MFU pins, and third adds Ethernet specific initialization.

Sachin Sanap (3):
  pxa: Hookup MAX7312 thats connected to I2C.
  [ARM] pxa: MFU pin configuration to support Fast ethernet.
  net: add Fast Ethernet driver for PXA168.

 arch/arm/mach-mmp/aspenite.c                |   81 ++-
 arch/arm/mach-mmp/include/mach/devices.h    |    1 +
 arch/arm/mach-mmp/include/mach/mfp-pxa168.h |   19 +
 arch/arm/mach-mmp/include/mach/pxa168.h     |    5 +
 arch/arm/mach-mmp/include/mach/pxa168_eth.h |   18 +
 arch/arm/mach-mmp/include/mach/regs-apmu.h  |    1 +
 arch/arm/mach-mmp/pxa168.c                  |    3 +
 drivers/net/Kconfig                         |   10 +
 drivers/net/Makefile                        |    1 +
 drivers/net/pxa168_eth.c                    | 1732 +++++++++++++++++++++++++++
 10 files changed, 1869 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/mach-mmp/include/mach/pxa168_eth.h
 create mode 100644 drivers/net/pxa168_eth.c

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-08-25  9:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1280849830-5350-1-git-send-email-ssanap@marvell.com>
2010-08-03 11:09 ` [PATCH 0/3] Enable Fast Ethernet on Aspenite Eric Miao
     [not found] ` <1280849830-5350-2-git-send-email-ssanap@marvell.com>
2010-08-03 11:21   ` [PATCH 1/3] [ARM] pxa: Hookup MAX7312 thats connected to I2C Eric Miao
     [not found]   ` <1280849830-5350-3-git-send-email-ssanap@marvell.com>
     [not found]     ` <1280849830-5350-4-git-send-email-ssanap@marvell.com>
2010-08-03 11:13       ` [PATCH 3/3] [ARM] pxa: Add support for Fast Ethernet driver Eric Miao
2010-08-03 11:17         ` Sachin Sanap
2010-08-03 11:21     ` [PATCH 2/3] [ARM] pxa: MFU pin configuration to support Fast ethernet Eric Miao
2010-08-25  9:17 [PATCH 0/3] Enable Fast Ethernet on Aspenite Sachin Sanap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).