#include <linux/ioport.h>
#include <linux/mtd/physmap.h>
#include <linux/platform_device.h>
- ----#include <asm/io.h>
+ ++++#include <linux/io.h>
#include <mach/hardware.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
.phy_id = 1,
};
-- ---static struct resource adssphere_eth_resource[] = {
-- --- {
-- --- .start = EP93XX_ETHERNET_PHYS_BASE,
-- --- .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
-- --- .flags = IORESOURCE_MEM,
-- --- }, {
-- --- .start = IRQ_EP93XX_ETHERNET,
-- --- .end = IRQ_EP93XX_ETHERNET,
-- --- .flags = IORESOURCE_IRQ,
-- --- }
-- ---};
-- ---
-- ---static struct platform_device adssphere_eth_device = {
-- --- .name = "ep93xx-eth",
-- --- .id = -1,
-- --- .dev = {
-- --- .platform_data = &adssphere_eth_data,
-- --- },
-- --- .num_resources = 2,
-- --- .resource = adssphere_eth_resource,
-- ---};
-- ---
static void __init adssphere_init_machine(void)
{
ep93xx_init_devices();
platform_device_register(&adssphere_flash);
-- --- memcpy(adssphere_eth_data.dev_addr,
-- --- (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
-- --- platform_device_register(&adssphere_eth_device);
++ +++ ep93xx_register_eth(&adssphere_eth_data, 1);
}
MACHINE_START(ADSSPHERE, "ADS Sphere board")
#include <linux/termios.h>
#include <linux/amba/bus.h>
#include <linux/amba/serial.h>
+ ++++#include <linux/io.h>
#include <asm/types.h>
#include <asm/setup.h>
#include <asm/system.h>
#include <asm/tlbflush.h>
#include <asm/pgtable.h>
- ----#include <asm/io.h>
#include <asm/mach/map.h>
#include <asm/mach/time.h>
static const u8 int_type1_register_offset[3] = { 0x90, 0xac, 0x4c };
static const u8 int_type2_register_offset[3] = { 0x94, 0xb0, 0x50 };
static const u8 eoi_register_offset[3] = { 0x98, 0xb4, 0x54 };
-- ---static const u8 int_en_register_offset[3] = { 0x9c, 0xb8, 0x5c };
++ +++static const u8 int_en_register_offset[3] = { 0x9c, 0xb8, 0x58 };
void ep93xx_gpio_update_int_params(unsigned port)
{
.resource = ep93xx_ohci_resources,
};
++ +++static struct ep93xx_eth_data ep93xx_eth_data;
++ +++
++ +++static struct resource ep93xx_eth_resource[] = {
++ +++ {
++ +++ .start = EP93XX_ETHERNET_PHYS_BASE,
++ +++ .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
++ +++ .flags = IORESOURCE_MEM,
++ +++ }, {
++ +++ .start = IRQ_EP93XX_ETHERNET,
++ +++ .end = IRQ_EP93XX_ETHERNET,
++ +++ .flags = IORESOURCE_IRQ,
++ +++ }
++ +++};
++ +++
++ +++static struct platform_device ep93xx_eth_device = {
++ +++ .name = "ep93xx-eth",
++ +++ .id = -1,
++ +++ .dev = {
++ +++ .platform_data = &ep93xx_eth_data,
++ +++ },
++ +++ .num_resources = ARRAY_SIZE(ep93xx_eth_resource),
++ +++ .resource = ep93xx_eth_resource,
++ +++};
++ +++
++ +++void __init ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr)
++ +++{
++ +++ if (copy_addr) {
++ +++ memcpy(data->dev_addr,
++ +++ (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
++ +++ }
++ +++
++ +++ ep93xx_eth_data = *data;
++ +++ platform_device_register(&ep93xx_eth_device);
++ +++}
++ +++
extern void ep93xx_gpio_init(void);
void __init ep93xx_init_devices(void)
#include <linux/ioport.h>
#include <linux/mtd/physmap.h>
#include <linux/platform_device.h>
- ----#include <asm/io.h>
+ ++++#include <linux/io.h>
#include <mach/hardware.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
.resource = &edb9302_flash_resource,
};
++ +++static struct ep93xx_eth_data edb9302_eth_data = {
++ +++ .phy_id = 1,
++ +++};
++ +++
static void __init edb9302_init_machine(void)
{
ep93xx_init_devices();
platform_device_register(&edb9302_flash);
++ +++
++ +++ ep93xx_register_eth(&edb9302_eth_data, 1);
}
MACHINE_START(EDB9302, "Cirrus Logic EDB9302 Evaluation Board")
#include <linux/ioport.h>
#include <linux/mtd/physmap.h>
#include <linux/platform_device.h>
- ----#include <asm/io.h>
+ ++++#include <linux/io.h>
#include <mach/hardware.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
.phy_id = 1,
};
-- ---static struct resource edb9302a_eth_resource[] = {
-- --- {
-- --- .start = EP93XX_ETHERNET_PHYS_BASE,
-- --- .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
-- --- .flags = IORESOURCE_MEM,
-- --- }, {
-- --- .start = IRQ_EP93XX_ETHERNET,
-- --- .end = IRQ_EP93XX_ETHERNET,
-- --- .flags = IORESOURCE_IRQ,
-- --- }
-- ---};
-- ---
-- ---static struct platform_device edb9302a_eth_device = {
-- --- .name = "ep93xx-eth",
-- --- .id = -1,
-- --- .dev = {
-- --- .platform_data = &edb9302a_eth_data,
-- --- },
-- --- .num_resources = 2,
-- --- .resource = edb9302a_eth_resource,
-- ---};
-- ---
static void __init edb9302a_init_machine(void)
{
ep93xx_init_devices();
platform_device_register(&edb9302a_flash);
-- --- memcpy(edb9302a_eth_data.dev_addr,
-- --- (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
-- --- platform_device_register(&edb9302a_eth_device);
++ +++ ep93xx_register_eth(&edb9302a_eth_data, 1);
}
MACHINE_START(EDB9302A, "Cirrus Logic EDB9302A Evaluation Board")
#include <linux/ioport.h>
#include <linux/mtd/physmap.h>
#include <linux/platform_device.h>
- ----#include <asm/io.h>
+ ++++#include <linux/io.h>
#include <mach/hardware.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
.phy_id = 1,
};
-- ---static struct resource edb9307_eth_resource[] = {
-- --- {
-- --- .start = EP93XX_ETHERNET_PHYS_BASE,
-- --- .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
-- --- .flags = IORESOURCE_MEM,
-- --- }, {
-- --- .start = IRQ_EP93XX_ETHERNET,
-- --- .end = IRQ_EP93XX_ETHERNET,
-- --- .flags = IORESOURCE_IRQ,
-- --- }
-- ---};
-- ---
-- ---static struct platform_device edb9307_eth_device = {
-- --- .name = "ep93xx-eth",
-- --- .id = -1,
-- --- .dev = {
-- --- .platform_data = &edb9307_eth_data,
-- --- },
-- --- .num_resources = 2,
-- --- .resource = edb9307_eth_resource,
-- ---};
-- ---
static void __init edb9307_init_machine(void)
{
ep93xx_init_devices();
platform_device_register(&edb9307_flash);
-- --- memcpy(edb9307_eth_data.dev_addr,
-- --- (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
-- --- platform_device_register(&edb9307_eth_device);
++ +++ ep93xx_register_eth(&edb9307_eth_data, 1);
}
MACHINE_START(EDB9307, "Cirrus Logic EDB9307 Evaluation Board")
#include <linux/ioport.h>
#include <linux/mtd/physmap.h>
#include <linux/platform_device.h>
- ----#include <asm/io.h>
+ ++++#include <linux/io.h>
#include <mach/hardware.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
.resource = &edb9312_flash_resource,
};
++ +++static struct ep93xx_eth_data edb9312_eth_data = {
++ +++ .phy_id = 1,
++ +++};
++ +++
static void __init edb9312_init_machine(void)
{
ep93xx_init_devices();
platform_device_register(&edb9312_flash);
++ +++
++ +++ ep93xx_register_eth(&edb9312_eth_data, 1);
}
MACHINE_START(EDB9312, "Cirrus Logic EDB9312 Evaluation Board")
#include <linux/ioport.h>
#include <linux/mtd/physmap.h>
#include <linux/platform_device.h>
- ----#include <asm/io.h>
+ ++++#include <linux/io.h>
#include <mach/hardware.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
.resource = &edb9315_flash_resource,
};
++ +++static struct ep93xx_eth_data edb9315_eth_data = {
++ +++ .phy_id = 1,
++ +++};
++ +++
static void __init edb9315_init_machine(void)
{
ep93xx_init_devices();
platform_device_register(&edb9315_flash);
++ +++
++ +++ ep93xx_register_eth(&edb9315_eth_data, 1);
}
MACHINE_START(EDB9315, "Cirrus Logic EDB9315 Evaluation Board")
#include <linux/ioport.h>
#include <linux/mtd/physmap.h>
#include <linux/platform_device.h>
- ----#include <asm/io.h>
+ ++++#include <linux/io.h>
#include <mach/hardware.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
.phy_id = 1,
};
-- ---static struct resource edb9315a_eth_resource[] = {
-- --- {
-- --- .start = EP93XX_ETHERNET_PHYS_BASE,
-- --- .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
-- --- .flags = IORESOURCE_MEM,
-- --- }, {
-- --- .start = IRQ_EP93XX_ETHERNET,
-- --- .end = IRQ_EP93XX_ETHERNET,
-- --- .flags = IORESOURCE_IRQ,
-- --- }
-- ---};
-- ---
-- ---static struct platform_device edb9315a_eth_device = {
-- --- .name = "ep93xx-eth",
-- --- .id = -1,
-- --- .dev = {
-- --- .platform_data = &edb9315a_eth_data,
-- --- },
-- --- .num_resources = 2,
-- --- .resource = edb9315a_eth_resource,
-- ---};
-- ---
static void __init edb9315a_init_machine(void)
{
ep93xx_init_devices();
platform_device_register(&edb9315a_flash);
-- --- memcpy(edb9315a_eth_data.dev_addr,
-- --- (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
-- --- platform_device_register(&edb9315a_eth_device);
++ +++ ep93xx_register_eth(&edb9315a_eth_data, 1);
}
MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board")
#include <linux/ioport.h>
#include <linux/mtd/physmap.h>
#include <linux/platform_device.h>
- ----#include <asm/io.h>
+ ++++#include <linux/io.h>
#include <mach/hardware.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
};
static struct ep93xx_eth_data gesbc9312_eth_data = {
-- --- .phy_id = 1,
-- ---};
-- ---
-- ---static struct resource gesbc9312_eth_resource[] = {
-- --- {
-- --- .start = EP93XX_ETHERNET_PHYS_BASE,
-- --- .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
-- --- .flags = IORESOURCE_MEM,
-- --- }, {
-- --- .start = IRQ_EP93XX_ETHERNET,
-- --- .end = IRQ_EP93XX_ETHERNET,
-- --- .flags = IORESOURCE_IRQ,
-- --- }
-- ---};
-- ---
-- ---static struct platform_device gesbc9312_eth_device = {
-- --- .name = "ep93xx-eth",
-- --- .id = -1,
-- --- .dev = {
-- --- .platform_data = &gesbc9312_eth_data,
-- --- },
-- --- .num_resources = 2,
-- --- .resource = gesbc9312_eth_resource,
++ +++ .phy_id = 1,
};
static void __init gesbc9312_init_machine(void)
{
ep93xx_init_devices();
platform_device_register(&gesbc9312_flash);
-- --- platform_device_register(&gesbc9312_eth_device);
++ +++
++ +++ ep93xx_register_eth(&gesbc9312_eth_data, 0);
}
MACHINE_START(GESBC9312, "Glomation GESBC-9312-sx")
#include <linux/init.h>
#include <linux/module.h>
#include <linux/seq_file.h>
+ ++++#include <linux/io.h>
#include <mach/ep93xx-regs.h>
- ----#include <asm/io.h>
#include <asm/gpio.h>
struct ep93xx_gpio_chip {
static struct ep93xx_gpio_chip ep93xx_gpio_banks[] = {
EP93XX_GPIO_BANK("A", 0x00, 0x10, 0),
EP93XX_GPIO_BANK("B", 0x04, 0x14, 8),
-- --- EP93XX_GPIO_BANK("C", 0x30, 0x34, 40),
++ +++ EP93XX_GPIO_BANK("C", 0x08, 0x18, 40),
EP93XX_GPIO_BANK("D", 0x0c, 0x1c, 24),
EP93XX_GPIO_BANK("E", 0x20, 0x24, 32),
-- --- EP93XX_GPIO_BANK("F", 0x08, 0x18, 16),
++ +++ EP93XX_GPIO_BANK("F", 0x30, 0x34, 16),
EP93XX_GPIO_BANK("G", 0x38, 0x3c, 48),
EP93XX_GPIO_BANK("H", 0x40, 0x44, 56),
};
#include <linux/mm.h>
#include <linux/platform_device.h>
#include <linux/sched.h>
- ----
+ ++++#include <linux/io.h>
#include <linux/mtd/physmap.h>
- ----#include <asm/io.h>
#include <mach/hardware.h>
#include <asm/mach/arch.h>
.phy_id = 0x1f,
};
-- ---static struct resource micro9_eth_resource[] = {
-- --- {
-- --- .start = EP93XX_ETHERNET_PHYS_BASE,
-- --- .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
-- --- .flags = IORESOURCE_MEM,
-- --- }, {
-- --- .start = IRQ_EP93XX_ETHERNET,
-- --- .end = IRQ_EP93XX_ETHERNET,
-- --- .flags = IORESOURCE_IRQ,
-- --- }
-- ---};
-- ---
-- ---static struct platform_device micro9_eth_device = {
-- --- .name = "ep93xx-eth",
-- --- .id = -1,
-- --- .dev = {
-- --- .platform_data = µ9_eth_data,
-- --- },
-- --- .num_resources = ARRAY_SIZE(micro9_eth_resource),
-- --- .resource = micro9_eth_resource,
-- ---};
-- ---
-- ---static void __init micro9_eth_init(void)
-- ---{
-- --- memcpy(micro9_eth_data.dev_addr,
-- --- (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
-- --- platform_device_register(µ9_eth_device);
-- ---}
-- ---
static void __init micro9_init(void)
{
-- --- micro9_eth_init();
++ +++ ep93xx_register_eth(µ9_eth_data, 1);
}
/*
#include <linux/mtd/physmap.h>
#include <linux/platform_device.h>
#include <linux/m48t86.h>
- ----#include <asm/io.h>
+ ++++#include <linux/io.h>
#include <mach/hardware.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
.phy_id = 1,
};
-- ---static struct resource ts72xx_eth_resource[] = {
-- --- {
-- --- .start = EP93XX_ETHERNET_PHYS_BASE,
-- --- .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
-- --- .flags = IORESOURCE_MEM,
-- --- }, {
-- --- .start = IRQ_EP93XX_ETHERNET,
-- --- .end = IRQ_EP93XX_ETHERNET,
-- --- .flags = IORESOURCE_IRQ,
-- --- }
-- ---};
-- ---
-- ---static struct platform_device ts72xx_eth_device = {
-- --- .name = "ep93xx-eth",
-- --- .id = -1,
-- --- .dev = {
-- --- .platform_data = &ts72xx_eth_data,
-- --- },
-- --- .num_resources = 2,
-- --- .resource = ts72xx_eth_resource,
-- ---};
-- ---
static void __init ts72xx_init_machine(void)
{
ep93xx_init_devices();
platform_device_register(&ts72xx_flash);
platform_device_register(&ts72xx_rtc_device);
-- --- memcpy(ts72xx_eth_data.dev_addr,
-- --- (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
-- --- platform_device_register(&ts72xx_eth_device);
++ +++ ep93xx_register_eth(&ts72xx_eth_data, 1);
}
MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC")
#include <linux/debugfs.h>
#include <linux/seq_file.h>
#include <linux/module.h>
+ ++++#include <linux/io.h>
- ----#include <asm/io.h>
#include <mach/hardware.h>
#include <asm/mach/irq.h>
/* set pin as input */
x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPM);
--- -- x &= ~IOPM_(pin);
+++ ++ x &= ~IOPM(pin);
__raw_writel(x, KS8695_GPIO_VA + KS8695_IOPM);
local_irq_restore(flags);
/* set pin as input */
x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPM);
--- -- x &= ~IOPM_(pin);
+++ ++ x &= ~IOPM(pin);
__raw_writel(x, KS8695_GPIO_VA + KS8695_IOPM);
local_irq_restore(flags);
/* set line state */
x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPD);
if (state)
--- -- x |= (1 << pin);
+++ ++ x |= IOPD(pin);
else
--- -- x &= ~(1 << pin);
+++ ++ x &= ~IOPD(pin);
__raw_writel(x, KS8695_GPIO_VA + KS8695_IOPD);
/* set pin as output */
x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPM);
--- -- x |= IOPM_(pin);
+++ ++ x |= IOPM(pin);
__raw_writel(x, KS8695_GPIO_VA + KS8695_IOPM);
local_irq_restore(flags);
/* set output line state */
x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPD);
if (state)
--- -- x |= (1 << pin);
+++ ++ x |= IOPD(pin);
else
--- -- x &= ~(1 << pin);
+++ ++ x &= ~IOPD(pin);
__raw_writel(x, KS8695_GPIO_VA + KS8695_IOPD);
local_irq_restore(flags);
return -EINVAL;
x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPD);
--- -- return (x & (1 << pin)) != 0;
+++ ++ return (x & IOPD(pin)) != 0;
}
EXPORT_SYMBOL(gpio_get_value);
for (i = KS8695_GPIO_0; i <= KS8695_GPIO_15 ; i++) {
seq_printf(s, "%i:\t", i);
--- -- seq_printf(s, "%s\t", (mode & IOPM_(i)) ? "Output" : "Input");
+++ ++ seq_printf(s, "%s\t", (mode & IOPM(i)) ? "Output" : "Input");
if (i <= KS8695_GPIO_3) {
if (ctrl & enable[i]) {
seq_printf(s, "\t");
--- -- seq_printf(s, "%i\n", (data & IOPD_(i)) ? 1 : 0);
+++ ++ seq_printf(s, "%i\n", (data & IOPD(i)) ? 1 : 0);
}
return 0;
}
#include <linux/init.h>
#include <linux/irq.h>
#include <linux/delay.h>
+ ++++#include <linux/io.h>
- ----#include <asm/io.h>
#include <asm/signal.h>
#include <asm/mach/pci.h>
#include <mach/hardware.h>
.write = ks8695_pci_writeconfig,
};
--- --static struct pci_bus *ks8695_pci_scan_bus(int nr, struct pci_sys_data *sys)
+++ ++static struct pci_bus* __init ks8695_pci_scan_bus(int nr, struct pci_sys_data *sys)
{
return pci_scan_bus(sys->busnr, &ks8695_pci_ops, sys);
}
#include <linux/ioport.h>
#include <linux/platform_device.h>
#include <linux/irq.h>
- ----
+ ++++#include <linux/io.h>
#include <linux/mtd/partitions.h>
#include <mach/hardware.h>
- ----#include <asm/io.h>
#include <asm/setup.h>
#include <asm/mach-types.h>
static struct resource smc91x_resources[] = {
[0] = {
----- .start = PLEB_ETH0_P,
----- .end = PLEB_ETH0_P | 0x03ffffff,
+++++ .start = PLEB_ETH0_P,
+++++ .end = PLEB_ETH0_P | 0x03ffffff,
.flags = IORESOURCE_MEM,
},
#if 0 /* Autoprobe instead, to get rising/falling edge characteristic right */
static struct mtd_partition pleb_partitions[] = {
{
.name = "blob",
----- .offset = 0,
+++++ .offset = 0,
.size = 0x00020000,
}, {
.name = "kernel",
----- .offset = MTDPART_OFS_APPEND,
+++++ .offset = MTDPART_OFS_APPEND,
.size = 0x000e0000,
}, {
.name = "rootfs",
----- .offset = MTDPART_OFS_APPEND,
+++++ .offset = MTDPART_OFS_APPEND,
.size = 0x00300000,
}
};