Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201463
b: refs/heads/master
c: 48f1d5a
h: refs/heads/master
i:
  201461: 4e956bd
  201459: 9bade6e
  201455: bb3ec4e
v: v3
  • Loading branch information
Linus Walleij authored and Russell King committed Jul 9, 2010
1 parent 1792900 commit c45189d
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 10 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: bde28b846e7e0ea6fea78f6ad1c43091fdf4d3e0
refs/heads/master: 48f1d5a3cef5782cbc7a32c29f1eda2342877c13
23 changes: 22 additions & 1 deletion trunk/arch/arm/mach-realview/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,21 @@ static unsigned int realview_mmc_status(struct device *dev)
struct amba_device *adev = container_of(dev, struct amba_device, dev);
u32 mask;

if (machine_is_realview_pb1176()) {
static bool inserted = false;

/*
* The PB1176 does not have the status register,
* assume it is inserted at startup, then invert
* for each call so card insertion/removal will
* be detected anyway. This will not be called if
* GPIO on PL061 is active, which is the proper
* way to do this on the PB1176.
*/
inserted = !inserted;
return inserted ? 0 : 1;
}

if (adev->res.start == REALVIEW_MMCI0_BASE)
mask = 1;
else
Expand Down Expand Up @@ -313,6 +328,12 @@ static struct clk_lookup lookups[] = {
}, { /* UART3 */
.dev_id = "fpga:uart3",
.clk = &ref24_clk,
}, { /* UART3 is on the dev chip in PB1176 */
.dev_id = "dev:uart3",
.clk = &ref24_clk,
}, { /* UART4 only exists in PB1176 */
.dev_id = "fpga:uart4",
.clk = &ref24_clk,
}, { /* KMI0 */
.dev_id = "fpga:kmi0",
.clk = &ref24_clk,
Expand All @@ -322,7 +343,7 @@ static struct clk_lookup lookups[] = {
}, { /* MMC0 */
.dev_id = "fpga:mmc0",
.clk = &ref24_clk,
}, { /* EB:CLCD */
}, { /* CLCD is in the PB1176 and EB DevChip */
.dev_id = "dev:clcd",
.clk = &oscvco_clk,
}, { /* PB:CLCD */
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-realview/include/mach/board-pb1176.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
/*
* Peripheral addresses
*/
#define REALVIEW_PB1176_UART4_BASE 0x10009000 /* UART 4 */
#define REALVIEW_PB1176_SCTL_BASE 0x10100000 /* System controller */
#define REALVIEW_PB1176_SMC_BASE 0x10111000 /* SMC */
#define REALVIEW_PB1176_DMC_BASE 0x10109000 /* DMC configuration */
Expand Down
14 changes: 6 additions & 8 deletions trunk/arch/arm/mach-realview/realview_pb1176.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,6 @@ static struct pl061_platform_data gpio2_plat_data = {
#define MPMC_DMA { 0, 0 }
#define PB1176_CLCD_IRQ { IRQ_DC1176_CLCD, NO_IRQ }
#define PB1176_CLCD_DMA { 0, 0 }
#define DMAC_IRQ { IRQ_PB1176_DMAC, NO_IRQ }
#define DMAC_DMA { 0, 0 }
#define SCTL_IRQ { NO_IRQ, NO_IRQ }
#define SCTL_DMA { 0, 0 }
#define PB1176_WATCHDOG_IRQ { IRQ_DC1176_WATCHDOG, NO_IRQ }
Expand All @@ -166,6 +164,8 @@ static struct pl061_platform_data gpio2_plat_data = {
#define PB1176_UART2_DMA { 11, 10 }
#define PB1176_UART3_IRQ { IRQ_DC1176_UART3, NO_IRQ }
#define PB1176_UART3_DMA { 0x86, 0x87 }
#define PB1176_UART4_IRQ { IRQ_PB1176_UART4, NO_IRQ }
#define PB1176_UART4_DMA { 0, 0 }
#define PB1176_SSP_IRQ { IRQ_PB1176_SSP, NO_IRQ }
#define PB1176_SSP_DMA { 9, 8 }

Expand All @@ -174,7 +174,7 @@ AMBA_DEVICE(aaci, "fpga:aaci", AACI, NULL);
AMBA_DEVICE(mmc0, "fpga:mmc0", MMCI0, &realview_mmc0_plat_data);
AMBA_DEVICE(kmi0, "fpga:kmi0", KMI0, NULL);
AMBA_DEVICE(kmi1, "fpga:kmi1", KMI1, NULL);
AMBA_DEVICE(uart3, "fpga:uart3", PB1176_UART3, NULL);
AMBA_DEVICE(uart4, "fpga:uart4", PB1176_UART4, NULL);

/* DevChip Primecells */
AMBA_DEVICE(smc, "dev:smc", PB1176_SMC, NULL);
Expand All @@ -188,18 +188,16 @@ AMBA_DEVICE(sci0, "dev:sci0", SCI, NULL);
AMBA_DEVICE(uart0, "dev:uart0", PB1176_UART0, NULL);
AMBA_DEVICE(uart1, "dev:uart1", PB1176_UART1, NULL);
AMBA_DEVICE(uart2, "dev:uart2", PB1176_UART2, NULL);
AMBA_DEVICE(uart3, "dev:uart3", PB1176_UART3, NULL);
AMBA_DEVICE(ssp0, "dev:ssp0", PB1176_SSP, NULL);

/* Primecells on the NEC ISSP chip */
AMBA_DEVICE(clcd, "issp:clcd", PB1176_CLCD, &clcd_plat_data);
//AMBA_DEVICE(dmac, "issp:dmac", PB1176_DMAC, NULL);
AMBA_DEVICE(clcd, "dev:clcd", PB1176_CLCD, &clcd_plat_data);

static struct amba_device *amba_devs[] __initdata = {
// &dmac_device,
&uart0_device,
&uart1_device,
&uart2_device,
&uart3_device,
&uart4_device,
&smc_device,
&clcd_device,
&sctl_device,
Expand Down

0 comments on commit c45189d

Please sign in to comment.