Skip to content

Commit

Permalink
Merge branch 'features/cs89x0' of git://git.pengutronix.de/git/imx/li…
Browse files Browse the repository at this point in the history
…nux-2.6 into next/drivers

* 'features/cs89x0' of git://git.pengutronix.de/git/imx/linux-2.6:
  CS89x0 : add CS89x0 platform device to the iMX31ADS board
  CS89x0 : remove QQ2440 board support from the CS89x0 driver
  CS89x0 : add CS89x0 platform device to the iMX21ADS board
  CS89x0 : add platform driver support
  • Loading branch information
Arnd Bergmann committed Feb 27, 2012
2 parents 2daa79e + 64a3851 commit afde962
Show file tree
Hide file tree
Showing 8 changed files with 186 additions and 73 deletions.
2 changes: 2 additions & 0 deletions arch/arm/configs/imx_v4_v5_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ CONFIG_MISC_DEVICES=y
CONFIG_EEPROM_AT24=y
CONFIG_EEPROM_AT25=y
CONFIG_NETDEVICES=y
CONFIG_CS89x0=y
CONFIG_CS89x0_PLATFORM=y
CONFIG_DM9000=y
CONFIG_SMC91X=y
CONFIG_SMC911X=y
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/configs/imx_v6_v7_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ CONFIG_MACH_ARMADILLO5X0=y
CONFIG_MACH_KZM_ARM11_01=y
CONFIG_MACH_PCM043=y
CONFIG_MACH_MX35_3DS=y
CONFIG_MACH_EUKREA_CPUIMX35=y
CONFIG_MACH_VPR200=y
CONFIG_MACH_IMX51_DT=y
CONFIG_MACH_MX51_3DS=y
Expand Down Expand Up @@ -82,8 +81,9 @@ CONFIG_PATA_IMX=y
CONFIG_NETDEVICES=y
# CONFIG_NET_VENDOR_BROADCOM is not set
# CONFIG_NET_VENDOR_CHELSIO is not set
CONFIG_CS89x0=y
CONFIG_CS89x0_PLATFORM=y
# CONFIG_NET_VENDOR_FARADAY is not set
CONFIG_FEC=y
# CONFIG_NET_VENDOR_INTEL is not set
# CONFIG_NET_VENDOR_MARVELL is not set
# CONFIG_NET_VENDOR_MICREL is not set
Expand Down
16 changes: 15 additions & 1 deletion arch/arm/mach-imx/mach-mx21ads.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
#define MX21ADS_REG_ADDR(offset) (void __force __iomem *) \
(MX21ADS_MMIO_BASE_ADDR + (offset))

#define MX21ADS_CS8900A_MMIO_SIZE 0x200000
#define MX21ADS_CS8900A_IRQ IRQ_GPIOE(11)
#define MX21ADS_CS8900A_IOBASE_REG MX21ADS_REG_ADDR(0x000000)
#define MX21ADS_ST16C255_IOBASE_REG MX21ADS_REG_ADDR(0x200000)
#define MX21ADS_VERSION_REG MX21ADS_REG_ADDR(0x400000)
#define MX21ADS_IO_REG MX21ADS_REG_ADDR(0x800000)
Expand Down Expand Up @@ -159,6 +159,18 @@ static struct platform_device mx21ads_nor_mtd_device = {
.resource = &mx21ads_flash_resource,
};

static const struct resource mx21ads_cs8900_resources[] __initconst = {
DEFINE_RES_MEM(MX21_CS1_BASE_ADDR, MX21ADS_CS8900A_MMIO_SIZE),
DEFINE_RES_IRQ(MX21ADS_CS8900A_IRQ),
};

static const struct platform_device_info mx21ads_cs8900_devinfo __initconst = {
.name = "cs89x0",
.id = 0,
.res = mx21ads_cs8900_resources,
.num_res = ARRAY_SIZE(mx21ads_cs8900_resources),
};

static const struct imxuart_platform_data uart_pdata_rts __initconst = {
.flags = IMXUART_HAVE_RTSCTS,
};
Expand Down Expand Up @@ -292,6 +304,8 @@ static void __init mx21ads_board_init(void)
imx21_add_mxc_nand(&mx21ads_nand_board_info);

platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
platform_device_register_full(
(struct platform_device_info *)&mx21ads_cs8900_devinfo);
}

static void __init mx21ads_timer_init(void)
Expand Down
35 changes: 32 additions & 3 deletions arch/arm/mach-imx/mach-mx31ads.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <asm/memory.h>
#include <asm/mach/map.h>
#include <mach/common.h>
#include <mach/board-mx31ads.h>
#include <mach/iomux-mx3.h>

#ifdef CONFIG_MACH_MX31ADS_WM1133_EV1
Expand All @@ -39,6 +38,9 @@

#include "devices-imx31.h"

/* Base address of PBC controller */
#define PBC_BASE_ADDRESS MX31_CS4_BASE_ADDR_VIRT

/* PBC Board interrupt status register */
#define PBC_INTSTATUS 0x000016

Expand All @@ -62,13 +64,18 @@
#define PBC_INTMASK_CLEAR_REG (PBC_INTMASK_CLEAR + PBC_BASE_ADDRESS)
#define EXPIO_PARENT_INT IOMUX_TO_IRQ(MX31_PIN_GPIO1_4)

#define MXC_EXP_IO_BASE MXC_BOARD_IRQ_START
#define MXC_IRQ_TO_EXPIO(irq) ((irq) - MXC_EXP_IO_BASE)

#define EXPIO_INT_XUART_INTA (MXC_EXP_IO_BASE + 10)
#define EXPIO_INT_XUART_INTB (MXC_EXP_IO_BASE + 11)

#define MXC_MAX_EXP_IO_LINES 16

/* CS8900 */
#define EXPIO_INT_ENET_INT (MXC_EXP_IO_BASE + 8)
#define CS4_CS8900_MMIO_START 0x20000

/*
* The serial port definition structure.
*/
Expand Down Expand Up @@ -101,11 +108,29 @@ static struct platform_device serial_device = {
},
};

static const struct resource mx31ads_cs8900_resources[] __initconst = {
DEFINE_RES_MEM(MX31_CS4_BASE_ADDR + CS4_CS8900_MMIO_START, SZ_64K),
DEFINE_RES_IRQ(EXPIO_INT_ENET_INT),
};

static const struct platform_device_info mx31ads_cs8900_devinfo __initconst = {
.name = "cs89x0",
.id = 0,
.res = mx31ads_cs8900_resources,
.num_res = ARRAY_SIZE(mx31ads_cs8900_resources),
};

static int __init mxc_init_extuart(void)
{
return platform_device_register(&serial_device);
}

static void __init mxc_init_ext_ethernet(void)
{
platform_device_register_full(
(struct platform_device_info *)&mx31ads_cs8900_devinfo);
}

static const struct imxuart_platform_data uart_pdata __initconst = {
.flags = IMXUART_HAVE_RTSCTS,
};
Expand Down Expand Up @@ -492,12 +517,15 @@ static void __init mxc_init_audio(void)
mxc_iomux_setup_multiple_pins(ssi_pins, ARRAY_SIZE(ssi_pins), "ssi");
}

/* static mappings */
/*
* Static mappings, starting from the CS4 start address up to the start address
* of the CS8900.
*/
static struct map_desc mx31ads_io_desc[] __initdata = {
{
.virtual = MX31_CS4_BASE_ADDR_VIRT,
.pfn = __phys_to_pfn(MX31_CS4_BASE_ADDR),
.length = MX31_CS4_SIZE / 2,
.length = CS4_CS8900_MMIO_START,
.type = MT_DEVICE
},
};
Expand All @@ -522,6 +550,7 @@ static void __init mx31ads_init(void)
mxc_init_imx_uart();
mxc_init_i2c();
mxc_init_audio();
mxc_init_ext_ethernet();
}

static void __init mx31ads_timer_init(void)
Expand Down
33 changes: 0 additions & 33 deletions arch/arm/plat-mxc/include/mach/board-mx31ads.h

This file was deleted.

2 changes: 2 additions & 0 deletions drivers/net/Space.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,10 @@ static struct devprobe2 isa_probes[] __initdata = {
{seeq8005_probe, 0},
#endif
#ifdef CONFIG_CS89x0
#ifndef CONFIG_CS89x0_PLATFORM
{cs89x0_probe, 0},
#endif
#endif
#ifdef CONFIG_AT1700
{at1700_probe, 0},
#endif
Expand Down
19 changes: 11 additions & 8 deletions drivers/net/ethernet/cirrus/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
config NET_VENDOR_CIRRUS
bool "Cirrus devices"
default y
depends on ISA || EISA || MACH_IXDP2351 || ARCH_IXDP2X01 \
|| MACH_MX31ADS || MACH_QQ2440 || (ARM && ARCH_EP93XX) || MAC
depends on ISA || EISA || ARM || MAC
---help---
If you have a network (Ethernet) card belonging to this class, say Y
and read the Ethernet-HOWTO, available from
Expand All @@ -21,8 +20,7 @@ if NET_VENDOR_CIRRUS

config CS89x0
tristate "CS89x0 support"
depends on (ISA || EISA || MACH_IXDP2351 \
|| ARCH_IXDP2X01 || MACH_MX31ADS || MACH_QQ2440)
depends on ISA || EISA || ARM
---help---
Support for CS89x0 chipset based Ethernet cards. If you have a
network (Ethernet) card of this type, say Y and read the
Expand All @@ -33,10 +31,15 @@ config CS89x0
To compile this driver as a module, choose M here. The module
will be called cs89x0.

config CS89x0_NONISA_IRQ
def_bool y
depends on CS89x0 != n
depends on MACH_IXDP2351 || ARCH_IXDP2X01 || MACH_MX31ADS || MACH_QQ2440
config CS89x0_PLATFORM
bool "CS89x0 platform driver support"
depends on CS89x0
help
Say Y to compile the cs89x0 driver as a platform driver. This
makes this driver suitable for use on certain evaluation boards
such as the iMX21ADS.

If you are unsure, say N.

config EP93XX_ETH
tristate "EP93xx Ethernet support"
Expand Down
Loading

0 comments on commit afde962

Please sign in to comment.