-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 201535 b: refs/heads/master c: 6279d0e h: refs/heads/master i: 201533: ded78f1 201531: bfa36b0 201527: 818bc5d 201519: 5ed4641 201503: 4eb3dad 201471: a90e296 v: v3
- Loading branch information
Anton Vorontsov
committed
Jun 8, 2010
1 parent
4ecc29f
commit a33193c
Showing
5 changed files
with
83 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 5f32f7a028c9e8e032132b1818bde6cda5785a6b | ||
refs/heads/master: 6279d0ea928911f7c747a65e880c36a91b066805 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
obj-$(CONFIG_ARCH_CNS3XXX) += core.o pm.o | ||
obj-$(CONFIG_ARCH_CNS3XXX) += core.o pm.o devices.o | ||
obj-$(CONFIG_PCI) += pcie.o | ||
obj-$(CONFIG_MACH_CNS3420VB) += cns3420vb.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* | ||
* CNS3xxx common devices | ||
* | ||
* Copyright 2008 Cavium Networks | ||
* Scott Shu | ||
* Copyright 2010 MontaVista Software, LLC. | ||
* Anton Vorontsov <avorontsov@mvista.com> | ||
* | ||
* This file is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License, Version 2, as | ||
* published by the Free Software Foundation. | ||
*/ | ||
|
||
#include <linux/io.h> | ||
#include <linux/init.h> | ||
#include <linux/compiler.h> | ||
#include <linux/platform_device.h> | ||
#include <mach/cns3xxx.h> | ||
#include <mach/irqs.h> | ||
#include "core.h" | ||
#include "devices.h" | ||
|
||
/* | ||
* SDHCI | ||
*/ | ||
static struct resource cns3xxx_sdhci_resources[] = { | ||
[0] = { | ||
.start = CNS3XXX_SDIO_BASE, | ||
.end = CNS3XXX_SDIO_BASE + SZ_4K - 1, | ||
.flags = IORESOURCE_MEM, | ||
}, | ||
[1] = { | ||
.start = IRQ_CNS3XXX_SDIO, | ||
.end = IRQ_CNS3XXX_SDIO, | ||
.flags = IORESOURCE_IRQ, | ||
}, | ||
}; | ||
|
||
static struct platform_device cns3xxx_sdhci_pdev = { | ||
.name = "sdhci-cns3xxx", | ||
.id = 0, | ||
.num_resources = ARRAY_SIZE(cns3xxx_sdhci_resources), | ||
.resource = cns3xxx_sdhci_resources, | ||
}; | ||
|
||
void __init cns3xxx_sdhci_init(void) | ||
{ | ||
u32 __iomem *gpioa = __io(CNS3XXX_MISC_BASE_VIRT + 0x0014); | ||
u32 gpioa_pins = __raw_readl(gpioa); | ||
|
||
/* MMC/SD pins share with GPIOA */ | ||
gpioa_pins |= 0x1fff0004; | ||
__raw_writel(gpioa_pins, gpioa); | ||
|
||
cns3xxx_pwr_clk_en(CNS3XXX_PWR_CLK_EN(SDIO)); | ||
cns3xxx_pwr_soft_rst(CNS3XXX_PWR_SOFTWARE_RST(SDIO)); | ||
|
||
platform_device_register(&cns3xxx_sdhci_pdev); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* CNS3xxx common devices | ||
* | ||
* Copyright 2008 Cavium Networks | ||
* Scott Shu | ||
* Copyright 2010 MontaVista Software, LLC. | ||
* Anton Vorontsov <avorontsov@mvista.com> | ||
* | ||
* This file is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License, Version 2, as | ||
* published by the Free Software Foundation. | ||
*/ | ||
|
||
#ifndef __CNS3XXX_DEVICES_H_ | ||
#define __CNS3XXX_DEVICES_H_ | ||
|
||
void __init cns3xxx_sdhci_init(void); | ||
|
||
#endif /* __CNS3XXX_DEVICES_H_ */ |