Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 296288
b: refs/heads/master
c: 29c140b
h: refs/heads/master
v: v3
  • Loading branch information
Russell King committed Feb 9, 2012
1 parent 64819df commit 6fafbae
Show file tree
Hide file tree
Showing 22 changed files with 537 additions and 428 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: fbae0f8912dc12b284433c05417ea76311205bbf
refs/heads/master: 29c140b623ce2c55131c6d1c26a2f3e455723b81
10 changes: 10 additions & 0 deletions trunk/arch/arm/common/sa1111.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
#define IRQ_S1_BVD1_STSCHG (54)

extern void sa1110_mb_enable(void);
extern void sa1110_mb_disable(void);

/*
* We keep the following data for the overall SA1111. Note that the
Expand Down Expand Up @@ -926,6 +927,10 @@ static int sa1111_suspend(struct platform_device *dev, pm_message_t state)

spin_unlock_irqrestore(&sachip->lock, flags);

#ifdef CONFIG_ARCH_SA1100
sa1110_mb_disable();
#endif

return 0;
}

Expand Down Expand Up @@ -966,6 +971,11 @@ static int sa1111_resume(struct platform_device *dev)
*/
sa1111_wake(sachip);

#ifdef CONFIG_ARCH_SA1100
/* Enable the memory bus request/grant signals */
sa1110_mb_enable();
#endif

/*
* Only lock for write ops. Also, sa1111_wake must be called with
* released spinlock!
Expand Down
39 changes: 13 additions & 26 deletions trunk/arch/arm/mach-sa1100/assabet.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@
#include "generic.h"

#define ASSABET_BCR_DB1110 \
(ASSABET_BCR_SPK_OFF | \
(ASSABET_BCR_SPK_OFF | ASSABET_BCR_QMUTE | \
ASSABET_BCR_LED_GREEN | ASSABET_BCR_LED_RED | \
ASSABET_BCR_RS232EN | ASSABET_BCR_LCD_12RGB | \
ASSABET_BCR_IRDA_MD0)

#define ASSABET_BCR_DB1111 \
(ASSABET_BCR_SPK_OFF | \
(ASSABET_BCR_SPK_OFF | ASSABET_BCR_QMUTE | \
ASSABET_BCR_LED_GREEN | ASSABET_BCR_LED_RED | \
ASSABET_BCR_RS232EN | ASSABET_BCR_LCD_12RGB | \
ASSABET_BCR_CF_BUS_OFF | ASSABET_BCR_STEREO_LB | \
Expand Down Expand Up @@ -152,8 +152,15 @@ static struct flash_platform_data assabet_flash_data = {
};

static struct resource assabet_flash_resources[] = {
DEFINE_RES_MEM(SA1100_CS0_PHYS, SZ_32M),
DEFINE_RES_MEM(SA1100_CS1_PHYS, SZ_32M),
{
.start = SA1100_CS0_PHYS,
.end = SA1100_CS0_PHYS + SZ_32M - 1,
.flags = IORESOURCE_MEM,
}, {
.start = SA1100_CS1_PHYS,
.end = SA1100_CS1_PHYS + SZ_32M - 1,
.flags = IORESOURCE_MEM,
}
};


Expand Down Expand Up @@ -197,39 +204,22 @@ static struct mcp_plat_data assabet_mcp_data = {
.sclk_rate = 11981000,
};

#ifdef CONFIG_ASSABET_NEPONSET
static struct resource neponset_resources[] = {
DEFINE_RES_MEM(0x10000000, 0x08000000),
DEFINE_RES_MEM(0x18000000, 0x04000000),
DEFINE_RES_MEM(0x40000000, SZ_8K),
DEFINE_RES_IRQ(IRQ_GPIO25),
};
#endif

static void __init assabet_init(void)
{
/*
* Ensure that the power supply is in "high power" mode.
*/
GPSR = GPIO_GPIO16;
GPDR |= GPIO_GPIO16;
GPSR = GPIO_GPIO16;

/*
* Ensure that these pins are set as outputs and are driving
* logic 0. This ensures that we won't inadvertently toggle
* the WS latch in the CPLD, and we don't float causing
* excessive power drain. --rmk
*/
GPCR = GPIO_SSP_TXD | GPIO_SSP_SCLK | GPIO_SSP_SFRM;
GPDR |= GPIO_SSP_TXD | GPIO_SSP_SCLK | GPIO_SSP_SFRM;

/*
* Also set GPIO27 as an output; this is used to clock UART3
* via the FPGA and as otherwise has no pullups or pulldowns,
* so stop it floating.
*/
GPCR = GPIO_GPIO27;
GPDR |= GPIO_GPIO27;
GPCR = GPIO_SSP_TXD | GPIO_SSP_SCLK | GPIO_SSP_SFRM;

/*
* Set up registers for sleep mode.
Expand All @@ -256,9 +246,6 @@ static void __init assabet_init(void)
#ifndef CONFIG_ASSABET_NEPONSET
printk( "Warning: Neponset detected but full support "
"hasn't been configured in the kernel\n" );
#else
platform_device_register_simple("neponset", 0,
neponset_resources, ARRAY_SIZE(neponset_resources));
#endif
}

Expand Down
19 changes: 15 additions & 4 deletions trunk/arch/arm/mach-sa1100/badge4.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,16 @@
#include "generic.h"

static struct resource sa1111_resources[] = {
[0] = DEFINE_RES_MEM(BADGE4_SA1111_BASE, 0x2000),
[1] = DEFINE_RES_IRQ(BADGE4_IRQ_GPIO_SA1111),
[0] = {
.start = BADGE4_SA1111_BASE,
.end = BADGE4_SA1111_BASE + 0x00001fff,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = BADGE4_IRQ_GPIO_SA1111,
.end = BADGE4_IRQ_GPIO_SA1111,
.flags = IORESOURCE_IRQ,
},
};

static struct sa1111_platform_data sa1111_info = {
Expand Down Expand Up @@ -113,8 +121,11 @@ static struct flash_platform_data badge4_flash_data = {
.nr_parts = ARRAY_SIZE(badge4_partitions),
};

static struct resource badge4_flash_resource =
DEFINE_RES_MEM(SA1100_CS0_PHYS, SZ_64M);
static struct resource badge4_flash_resource = {
.start = SA1100_CS0_PHYS,
.end = SA1100_CS0_PHYS + SZ_64M - 1,
.flags = IORESOURCE_MEM,
};

static int five_v_on __initdata = 0;

Expand Down
13 changes: 10 additions & 3 deletions trunk/arch/arm/mach-sa1100/cerf.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@
#include "generic.h"

static struct resource cerfuart2_resources[] = {
[0] = DEFINE_RES_MEM(0x80030000, SZ_64K),
[0] = {
.start = 0x80030000,
.end = 0x8003ffff,
.flags = IORESOURCE_MEM,
},
};

static struct platform_device cerfuart2_device = {
Expand Down Expand Up @@ -83,8 +87,11 @@ static struct flash_platform_data cerf_flash_data = {
.nr_parts = ARRAY_SIZE(cerf_partitions),
};

static struct resource cerf_flash_resource =
DEFINE_RES_MEM(SA1100_CS0_PHYS, SZ_32M);
static struct resource cerf_flash_resource = {
.start = SA1100_CS0_PHYS,
.end = SA1100_CS0_PHYS + SZ_32M - 1,
.flags = IORESOURCE_MEM,
};

static void __init cerf_init_irq(void)
{
Expand Down
24 changes: 20 additions & 4 deletions trunk/arch/arm/mach-sa1100/collie.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@
#include "generic.h"

static struct resource collie_scoop_resources[] = {
[0] = DEFINE_RES_MEM(0x40800000, SZ_4K),
[0] = {
.start = 0x40800000,
.end = 0x40800fff,
.flags = IORESOURCE_MEM,
},
};

static struct scoop_config collie_scoop_setup = {
Expand Down Expand Up @@ -217,8 +221,16 @@ device_initcall(collie_uart_init);


static struct resource locomo_resources[] = {
[0] = DEFINE_RES_MEM(0x40000000, SZ_8K),
[1] = DEFINE_RES_IRQ(IRQ_GPIO25),
[0] = {
.start = 0x40000000,
.end = 0x40001fff,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_GPIO25,
.end = IRQ_GPIO25,
.flags = IORESOURCE_IRQ,
},
};

static struct locomo_platform_data locomo_info = {
Expand Down Expand Up @@ -291,7 +303,11 @@ static struct flash_platform_data collie_flash_data = {
};

static struct resource collie_flash_resources[] = {
DEFINE_RES_MEM(SA1100_CS0_PHYS, SZ_32M),
{
.start = SA1100_CS0_PHYS,
.end = SA1100_CS0_PHYS + SZ_32M - 1,
.flags = IORESOURCE_MEM,
}
};

static void __init collie_init(void)
Expand Down
97 changes: 79 additions & 18 deletions trunk/arch/arm/mach-sa1100/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,16 @@ static void sa11x0_register_device(struct platform_device *dev, void *data)


static struct resource sa11x0udc_resources[] = {
[0] = DEFINE_RES_MEM(__PREG(Ser0UDCCR), SZ_64K),
[1] = DEFINE_RES_IRQ(IRQ_Ser0UDC),
[0] = {
.start = __PREG(Ser0UDCCR),
.end = __PREG(Ser0UDCCR) + 0xffff,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_Ser0UDC,
.end = IRQ_Ser0UDC,
.flags = IORESOURCE_IRQ,
},
};

static u64 sa11x0udc_dma_mask = 0xffffffffUL;
Expand All @@ -167,8 +175,16 @@ static struct platform_device sa11x0udc_device = {
};

static struct resource sa11x0uart1_resources[] = {
[0] = DEFINE_RES_MEM(__PREG(Ser1UTCR0), SZ_64K),
[1] = DEFINE_RES_IRQ(IRQ_Ser1UART),
[0] = {
.start = __PREG(Ser1UTCR0),
.end = __PREG(Ser1UTCR0) + 0xffff,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_Ser1UART,
.end = IRQ_Ser1UART,
.flags = IORESOURCE_IRQ,
},
};

static struct platform_device sa11x0uart1_device = {
Expand All @@ -179,8 +195,16 @@ static struct platform_device sa11x0uart1_device = {
};

static struct resource sa11x0uart3_resources[] = {
[0] = DEFINE_RES_MEM(__PREG(Ser3UTCR0), SZ_64K),
[1] = DEFINE_RES_IRQ(IRQ_Ser3UART),
[0] = {
.start = __PREG(Ser3UTCR0),
.end = __PREG(Ser3UTCR0) + 0xffff,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_Ser3UART,
.end = IRQ_Ser3UART,
.flags = IORESOURCE_IRQ,
},
};

static struct platform_device sa11x0uart3_device = {
Expand All @@ -191,8 +215,16 @@ static struct platform_device sa11x0uart3_device = {
};

static struct resource sa11x0mcp_resources[] = {
[0] = DEFINE_RES_MEM(__PREG(Ser4MCCR0), SZ_64K),
[1] = DEFINE_RES_IRQ(IRQ_Ser4MCP),
[0] = {
.start = __PREG(Ser4MCCR0),
.end = __PREG(Ser4MCCR0) + 0xffff,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_Ser4MCP,
.end = IRQ_Ser4MCP,
.flags = IORESOURCE_IRQ,
},
};

static u64 sa11x0mcp_dma_mask = 0xffffffffUL;
Expand All @@ -214,8 +246,16 @@ void sa11x0_register_mcp(struct mcp_plat_data *data)
}

static struct resource sa11x0ssp_resources[] = {
[0] = DEFINE_RES_MEM(0x80070000, SZ_64K),
[1] = DEFINE_RES_IRQ(IRQ_Ser4SSP),
[0] = {
.start = 0x80070000,
.end = 0x8007ffff,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_Ser4SSP,
.end = IRQ_Ser4SSP,
.flags = IORESOURCE_IRQ,
},
};

static u64 sa11x0ssp_dma_mask = 0xffffffffUL;
Expand All @@ -232,8 +272,16 @@ static struct platform_device sa11x0ssp_device = {
};

static struct resource sa11x0fb_resources[] = {
[0] = DEFINE_RES_MEM(0xb0100000, SZ_64K),
[1] = DEFINE_RES_IRQ(IRQ_LCD),
[0] = {
.start = 0xb0100000,
.end = 0xb010ffff,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_LCD,
.end = IRQ_LCD,
.flags = IORESOURCE_IRQ,
},
};

static struct platform_device sa11x0fb_device = {
Expand Down Expand Up @@ -266,10 +314,23 @@ void sa11x0_register_mtd(struct flash_platform_data *flash,
}

static struct resource sa11x0ir_resources[] = {
DEFINE_RES_MEM(__PREG(Ser2UTCR0), 0x24),
DEFINE_RES_MEM(__PREG(Ser2HSCR0), 0x1c),
DEFINE_RES_MEM(__PREG(Ser2HSCR2), 0x04),
DEFINE_RES_IRQ(IRQ_Ser2ICP),
{
.start = __PREG(Ser2UTCR0),
.end = __PREG(Ser2UTCR0) + 0x24 - 1,
.flags = IORESOURCE_MEM,
}, {
.start = __PREG(Ser2HSCR0),
.end = __PREG(Ser2HSCR0) + 0x1c - 1,
.flags = IORESOURCE_MEM,
}, {
.start = __PREG(Ser2HSCR2),
.end = __PREG(Ser2HSCR2) + 0x04 - 1,
.flags = IORESOURCE_MEM,
}, {
.start = IRQ_Ser2ICP,
.end = IRQ_Ser2ICP,
.flags = IORESOURCE_IRQ,
}
};

static struct platform_device sa11x0ir_device = {
Expand Down Expand Up @@ -367,7 +428,7 @@ void __init sa1100_map_io(void)
* the MBGNT signal false to ensure the SA1111 doesn't own the
* SDRAM bus.
*/
void sa1110_mb_disable(void)
void __init sa1110_mb_disable(void)
{
unsigned long flags;

Expand All @@ -386,7 +447,7 @@ void sa1110_mb_disable(void)
* If the system is going to use the SA-1111 DMA engines, set up
* the memory bus request/grant pins.
*/
void sa1110_mb_enable(void)
void __devinit sa1110_mb_enable(void)
{
unsigned long flags;

Expand Down
Loading

0 comments on commit 6fafbae

Please sign in to comment.