Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 62662
b: refs/heads/master
c: e09d02e
h: refs/heads/master
v: v3
  • Loading branch information
Eric Miao authored and Russell King committed Jul 20, 2007
1 parent 4934eb1 commit f440819
Show file tree
Hide file tree
Showing 13 changed files with 66 additions and 101 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 26c671c6b7c02bc9f9c42331e6ecbeccdf67164c
refs/heads/master: e09d02e123fb6944af23a0697369ebcfc15acf73
1 change: 0 additions & 1 deletion trunk/arch/arm/mach-ns9xxx/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
obj-y := irq.o time.o generic.o

obj-$(CONFIG_MACH_CC9P9360DEV) += mach-cc9p9360dev.o
obj-$(CONFIG_MACH_CC9P9360JS) += mach-cc9p9360js.o

obj-$(CONFIG_BOARD_A9M9750DEV) += board-a9m9750dev.o
obj-$(CONFIG_BOARD_JSCC9P9360) += board-jscc9p9360.o
7 changes: 4 additions & 3 deletions trunk/arch/arm/mach-ns9xxx/board-a9m9750dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static void a9m9750dev_fpga_demux_handler(unsigned int irq,

desc = irq_desc + FPGA_IRQ(irqno);

desc_handle_irq(FPGA_IRQ(irqno), desc);
desc_handle_irq(irqno, desc);
}
}

Expand All @@ -91,7 +91,7 @@ void __init board_a9m9750dev_init_irq(void)
* use GPIO 11, because GPIO 32 is used for the LCD
*/
/* XXX: proper GPIO handling */
BBU_GCONFb1(1) &= ~0x2000;
BBU_GC(2) &= ~0x2000;

for (i = FPGA_IRQ(0); i <= FPGA_IRQ(7); ++i) {
set_irq_chip(i, &a9m9750dev_fpga_chip);
Expand Down Expand Up @@ -178,7 +178,7 @@ void __init board_a9m9750dev_init_machine(void)

/* setup static CS0: memory configuration */
reg = MEM_SMC(0);
REGSET(reg, MEM_SMC, PSMC, OFF);
REGSET(reg, MEM_SMC, WSMC, OFF);
REGSET(reg, MEM_SMC, BSMC, OFF);
REGSET(reg, MEM_SMC, EW, OFF);
REGSET(reg, MEM_SMC, PB, 1);
Expand All @@ -196,3 +196,4 @@ void __init board_a9m9750dev_init_machine(void)
platform_add_devices(board_a9m9750dev_devices,
ARRAY_SIZE(board_a9m9750dev_devices));
}

2 changes: 0 additions & 2 deletions trunk/arch/arm/mach-ns9xxx/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
#include <asm/arch-ns9xxx/regs-mem.h>
#include <asm/arch-ns9xxx/board.h>

#include "generic.h"

static struct map_desc standard_io_desc[] __initdata = {
{ /* BBus */
.virtual = io_p2v(0x90000000),
Expand Down
11 changes: 1 addition & 10 deletions trunk/arch/arm/mach-ns9xxx/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,14 @@ static void ns9xxx_ack_irq_timer(unsigned int irq)
{
u32 tc = SYS_TC(irq - IRQ_TIMER0);

/*
* If the timer is programmed to halt on terminal count, the
* timer must be disabled before clearing the interrupt.
*/
if (REGGET(tc, SYS_TCx, REN) == 0) {
REGSET(tc, SYS_TCx, TEN, DIS);
SYS_TC(irq - IRQ_TIMER0) = tc;
}

REGSET(tc, SYS_TCx, INTC, SET);
SYS_TC(irq - IRQ_TIMER0) = tc;

REGSET(tc, SYS_TCx, INTC, UNSET);
SYS_TC(irq - IRQ_TIMER0) = tc;
}

static void (*ns9xxx_ack_irq_functions[NR_IRQS])(unsigned int) = {
void (*ns9xxx_ack_irq_functions[NR_IRQS])(unsigned int) = {
[IRQ_TIMER0] = ns9xxx_ack_irq_timer,
[IRQ_TIMER1] = ns9xxx_ack_irq_timer,
[IRQ_TIMER2] = ns9xxx_ack_irq_timer,
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-ns9xxx/mach-cc9p9360js.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ static void __init mach_cc9p9360js_init_machine(void)
board_jscc9p9360_init_machine();
}

MACHINE_START(CC9P9360JS, "Digi ConnectCore 9P 9360 on an JSCC9P9360 Devboard")
MACHINE_START(CC9P9360DEV, "Digi ConnectCore 9P 9360 on an JSCC9P9360 Devboard")
.map_io = ns9xxx_map_io,
.init_irq = ns9xxx_init_irq,
.init_machine = mach_cc9p9360js_init_machine,
Expand Down
22 changes: 11 additions & 11 deletions trunk/arch/arm/mach-pxa/devices.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
extern struct platform_device pxamci_device;
extern struct platform_device pxaudc_device;
extern struct platform_device pxafb_device;
extern struct platform_device ffuart_device;
extern struct platform_device btuart_device;
extern struct platform_device stuart_device;
extern struct platform_device hwuart_device;
extern struct platform_device pxai2c_device;
extern struct platform_device pxai2s_device;
extern struct platform_device pxaficp_device;
extern struct platform_device pxartc_device;
extern struct platform_device pxa_device_mci;
extern struct platform_device pxa_device_udc;
extern struct platform_device pxa_device_fb;
extern struct platform_device pxa_device_ffuart;
extern struct platform_device pxa_device_btuart;
extern struct platform_device pxa_device_stuart;
extern struct platform_device pxa_device_hwuart;
extern struct platform_device pxa_device_i2c;
extern struct platform_device pxa_device_i2s;
extern struct platform_device pxa_device_ficp;
extern struct platform_device pxa_device_rtc;
32 changes: 16 additions & 16 deletions trunk/arch/arm/mach-pxa/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ static struct resource pxamci_resources[] = {

static u64 pxamci_dmamask = 0xffffffffUL;

struct platform_device pxamci_device = {
struct platform_device pxa_device_mci = {
.name = "pxa2xx-mci",
.id = -1,
.dev = {
Expand All @@ -256,7 +256,7 @@ struct platform_device pxamci_device = {

void __init pxa_set_mci_info(struct pxamci_platform_data *info)
{
pxamci_device.dev.platform_data = info;
pxa_device_mci.dev.platform_data = info;
}


Expand All @@ -282,7 +282,7 @@ static struct resource pxa2xx_udc_resources[] = {

static u64 udc_dma_mask = ~(u32)0;

struct platform_device pxaudc_device = {
struct platform_device pxa_device_udc = {
.name = "pxa2xx-udc",
.id = -1,
.resource = pxa2xx_udc_resources,
Expand All @@ -308,7 +308,7 @@ static struct resource pxafb_resources[] = {

static u64 fb_dma_mask = ~(u64)0;

struct platform_device pxafb_device = {
struct platform_device pxa_device_fb = {
.name = "pxa2xx-fb",
.id = -1,
.dev = {
Expand All @@ -321,27 +321,27 @@ struct platform_device pxafb_device = {

void __init set_pxa_fb_info(struct pxafb_mach_info *info)
{
pxafb_device.dev.platform_data = info;
pxa_device_fb.dev.platform_data = info;
}

void __init set_pxa_fb_parent(struct device *parent_dev)
{
pxafb_device.dev.parent = parent_dev;
pxa_device_fb.dev.parent = parent_dev;
}

struct platform_device ffuart_device = {
struct platform_device pxa_device_ffuart= {
.name = "pxa2xx-uart",
.id = 0,
};
struct platform_device btuart_device = {
struct platform_device pxa_device_btuart = {
.name = "pxa2xx-uart",
.id = 1,
};
struct platform_device stuart_device = {
struct platform_device pxa_device_stuart = {
.name = "pxa2xx-uart",
.id = 2,
};
struct platform_device hwuart_device = {
struct platform_device pxa_device_hwuart = {
.name = "pxa2xx-uart",
.id = 3,
};
Expand All @@ -358,7 +358,7 @@ static struct resource pxai2c_resources[] = {
},
};

struct platform_device pxai2c_device = {
struct platform_device pxa_device_i2c = {
.name = "pxa2xx-i2c",
.id = 0,
.resource = pxai2c_resources,
Expand All @@ -367,7 +367,7 @@ struct platform_device pxai2c_device = {

void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info)
{
pxai2c_device.dev.platform_data = info;
pxa_device_i2c.dev.platform_data = info;
}

static struct resource pxai2s_resources[] = {
Expand All @@ -382,7 +382,7 @@ static struct resource pxai2s_resources[] = {
},
};

struct platform_device pxai2s_device = {
struct platform_device pxa_device_i2s = {
.name = "pxa2xx-i2s",
.id = -1,
.resource = pxai2s_resources,
Expand All @@ -391,7 +391,7 @@ struct platform_device pxai2s_device = {

static u64 pxaficp_dmamask = ~(u32)0;

struct platform_device pxaficp_device = {
struct platform_device pxa_device_ficp = {
.name = "pxa2xx-ir",
.id = -1,
.dev = {
Expand All @@ -402,10 +402,10 @@ struct platform_device pxaficp_device = {

void __init pxa_set_ficp_info(struct pxaficp_platform_data *info)
{
pxaficp_device.dev.platform_data = info;
pxa_device_ficp.dev.platform_data = info;
}

struct platform_device pxartc_device = {
struct platform_device pxa_device_rtc = {
.name = "sa1100-rtc",
.id = -1,
};
22 changes: 11 additions & 11 deletions trunk/arch/arm/mach-pxa/pxa25x.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,16 @@ void __init pxa25x_init_irq(void)
}

static struct platform_device *pxa25x_devices[] __initdata = {
&pxamci_device,
&pxaudc_device,
&pxafb_device,
&ffuart_device,
&btuart_device,
&stuart_device,
&pxai2c_device,
&pxai2s_device,
&pxaficp_device,
&pxartc_device,
&pxa_device_mci,
&pxa_device_udc,
&pxa_device_fb,
&pxa_device_ffuart,
&pxa_device_btuart,
&pxa_device_stuart,
&pxa_device_i2c,
&pxa_device_i2s,
&pxa_device_ficp,
&pxa_device_rtc,
};

static int __init pxa25x_init(void)
Expand All @@ -166,7 +166,7 @@ static int __init pxa25x_init(void)
}
/* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */
if (cpu_is_pxa25x())
ret = platform_device_register(&hwuart_device);
ret = platform_device_register(&pxa_device_hwuart);

return ret;
}
Expand Down
30 changes: 15 additions & 15 deletions trunk/arch/arm/mach-pxa/pxa27x.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ static struct resource pxa27x_ohci_resources[] = {
},
};

static struct platform_device pxaohci_device = {
static struct platform_device pxa27x_device_ohci = {
.name = "pxa27x-ohci",
.id = -1,
.dev = {
Expand All @@ -198,7 +198,7 @@ static struct platform_device pxaohci_device = {

void __init pxa_set_ohci_info(struct pxaohci_platform_data *info)
{
pxaohci_device.dev.platform_data = info;
pxa27x_device_ohci.dev.platform_data = info;
}

static struct resource i2c_power_resources[] = {
Expand All @@ -213,26 +213,26 @@ static struct resource i2c_power_resources[] = {
},
};

static struct platform_device pxai2c_power_device = {
static struct platform_device pxa27x_device_i2c_power = {
.name = "pxa2xx-i2c",
.id = 1,
.resource = i2c_power_resources,
.num_resources = ARRAY_SIZE(i2c_power_resources),
};

static struct platform_device *devices[] __initdata = {
&pxamci_device,
&pxaudc_device,
&pxafb_device,
&ffuart_device,
&btuart_device,
&stuart_device,
&pxai2c_device,
&pxai2c_power_device,
&pxai2s_device,
&pxaficp_device,
&pxartc_device,
&pxaohci_device,
&pxa_device_mci,
&pxa_device_udc,
&pxa_device_fb,
&pxa_device_ffuart,
&pxa_device_btuart,
&pxa_device_stuart,
&pxa_device_i2c,
&pxa_device_i2s,
&pxa_device_ficp,
&pxa_device_rtc,
&pxa27x_device_i2c_power,
&pxa27x_device_ohci,
};

void __init pxa27x_init_irq(void)
Expand Down
28 changes: 2 additions & 26 deletions trunk/include/asm-arm/arch-ns9xxx/regs-bbu.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,7 @@

/* BBus Utility */

/* GPIO Configuration Registers block 1 */
/* NOTE: the HRM starts counting at 1 for the GPIO registers, here the start is
* at 0 for each block. That is, BBU_GCONFb1(0) is GPIO Configuration Register
* #1, BBU_GCONFb2(0) is GPIO Configuration Register #8. */
#define BBU_GCONFb1(x) __REG2(0x90600010, (x))
#define BBU_GCONFb2(x) __REG2(0x90600100, (x))

#define BBU_GCONFx_DIR(m) __REGBIT(3 + (((m) & 7) << 2))
#define BBU_GCONFx_DIR_INPUT(m) __REGVAL(BBU_GCONFx_DIR(m), 0)
#define BBU_GCONFx_DIR_OUTPUT(m) __REGVAL(BBU_GCONFx_DIR(m), 1)
#define BBU_GCONFx_INV(m) __REGBIT(2 + (((m) & 7) << 2))
#define BBU_GCONFx_INV_NO(m) __REGVAL(BBU_GCONFx_INV(m), 0)
#define BBU_GCONFx_INV_YES(m) __REGVAL(BBU_GCONFx_INV(m), 1)
#define BBU_GCONFx_FUNC(m) __REGBITS(1 + (((m) & 7) << 2), ((m) & 7) << 2)
#define BBU_GCONFx_FUNC_0(m) __REGVAL(BBU_GCONFx_FUNC(m), 0)
#define BBU_GCONFx_FUNC_1(m) __REGVAL(BBU_GCONFx_FUNC(m), 1)
#define BBU_GCONFx_FUNC_2(m) __REGVAL(BBU_GCONFx_FUNC(m), 2)
#define BBU_GCONFx_FUNC_3(m) __REGVAL(BBU_GCONFx_FUNC(m), 3)

#define BBU_GCTRL1 __REG(0x90600030)
#define BBU_GCTRL2 __REG(0x90600034)
#define BBU_GCTRL3 __REG(0x90600120)

#define BBU_GSTAT1 __REG(0x90600040)
#define BBU_GSTAT2 __REG(0x90600044)
#define BBU_GSTAT3 __REG(0x90600130)
/* GPIO Configuration Register */
#define BBU_GC(x) __REG2(0x9060000c, (x))

#endif /* ifndef __ASM_ARCH_REGSBBU_H */
6 changes: 3 additions & 3 deletions trunk/include/asm-arm/arch-ns9xxx/regs-mem.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@
#define MEM_SMC(x) __REG2(0xa0700200, (x) << 3)

/* Static Memory Configuration Register x: Write protect */
#define MEM_SMC_PSMC __REGBIT(20)
#define MEM_SMC_PSMC_OFF __REGVAL(MEM_SMC_PSMC, 0)
#define MEM_SMC_PSMC_ON __REGVAL(MEM_SMC_PSMC, 1)
#define MEM_SMC_WSMC __REGBIT(20)
#define MEM_SMC_WSMC_OFF __REGVAL(MEM_SMC_WSMC, 0)
#define MEM_SMC_WSMC_ON __REGVAL(MEM_SMC_WSMC, 1)

/* Static Memory Configuration Register x: Buffer enable */
#define MEM_SMC_BSMC __REGBIT(19)
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/asm-arm/arch-ns9xxx/regs-sys.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

/* Timer x Control register: Timer enable */
#define SYS_TCx_TEN __REGBIT(15)
#define SYS_TCx_TEN_DIS __REGVAL(SYS_TCx_TEN, 0)
#define SYS_TCx_TEN_DIS __REGVAL(SYS_TCx_TEN, 1)
#define SYS_TCx_TEN_EN __REGVAL(SYS_TCx_TEN, 1)

/* Timer x Control register: CPU debug mode */
Expand Down

0 comments on commit f440819

Please sign in to comment.