From: Jan Luebbe <jlu@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 13/19] ARM omap4: Use device register functions in boards
Date: Tue, 18 Dec 2012 15:22:35 +0100 [thread overview]
Message-ID: <1355840561-11552-14-git-send-email-jlu@pengutronix.de> (raw)
In-Reply-To: <1355840561-11552-1-git-send-email-jlu@pengutronix.de>
From: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/archosg9/board.c | 17 +++++------------
arch/arm/boards/panda/board.c | 18 ++++--------------
arch/arm/boards/pcm049/board.c | 17 ++++-------------
arch/arm/boards/phycard-a-xl2/pca-a-xl2.c | 16 ++++------------
4 files changed, 17 insertions(+), 51 deletions(-)
diff --git a/arch/arm/boards/archosg9/board.c b/arch/arm/boards/archosg9/board.c
index dab0a36..5f62748 100644
--- a/arch/arm/boards/archosg9/board.c
+++ b/arch/arm/boards/archosg9/board.c
@@ -16,14 +16,11 @@
#include <asm/armlinux.h>
#include <generated/mach-types.h>
#include <mach/omap4-silicon.h>
+#include <mach/omap4-devices.h>
#include <sizes.h>
#include <i2c/i2c.h>
#include <gpio.h>
-static struct NS16550_plat serial_plat = {
- .clock = 48000000, /* 48MHz (APLL96/2) */
- .shift = 2,
-};
static int archosg9_console_init(void){
if (IS_ENABLED(CONFIG_DRIVER_SERIAL_OMAP4_USBBOOT))
add_generic_device("serial_omap4_usbboot", DEVICE_ID_DYNAMIC
@@ -31,8 +28,7 @@ static int archosg9_console_init(void){
if (IS_ENABLED(CONFIG_DRIVER_SERIAL_NS16550)) {
gpio_direction_output(41, 0); /* gps_disable */
gpio_direction_output(34, 1); /* 1v8_pwron */
- add_ns16550_device(DEVICE_ID_DYNAMIC, OMAP44XX_UART1_BASE, 1024,
- IORESOURCE_MEM_8BIT, &serial_plat);
+ omap44xx_add_uart1();
}
return 0;
}
@@ -50,12 +46,9 @@ static struct i2c_board_info i2c_devices[] = {
static int archosg9_devices_init(void){
i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices));
- add_generic_device("i2c-omap" , DEVICE_ID_DYNAMIC, NULL,
- OMAP44XX_I2C1_BASE, 0x100, IORESOURCE_MEM, NULL);
- add_generic_device("omap-hsmmc", DEVICE_ID_DYNAMIC, NULL,
- OMAP44XX_MMC1_BASE, SZ_4K, IORESOURCE_MEM, NULL);
- add_generic_device("omap-hsmmc", DEVICE_ID_DYNAMIC, NULL,
- OMAP44XX_MMC2_BASE, SZ_4K, IORESOURCE_MEM, NULL);
+ omap44xx_add_i2c1(NULL);
+ omap44xx_add_mmc1(NULL);
+ omap44xx_add_mmc2(NULL);
armlinux_set_bootparams((void *)0x80000100);
/*
diff --git a/arch/arm/boards/panda/board.c b/arch/arm/boards/panda/board.c
index 99222d2..5b27f46 100644
--- a/arch/arm/boards/panda/board.c
+++ b/arch/arm/boards/panda/board.c
@@ -9,6 +9,7 @@
#include <linux/stat.h>
#include <generated/mach-types.h>
#include <mach/omap4-silicon.h>
+#include <mach/omap4-devices.h>
#include <mach/sdrc.h>
#include <mach/sys_info.h>
#include <mach/syslib.h>
@@ -33,16 +34,9 @@ static int board_revision;
#define GPIO_BOARD_ID1 101
#define GPIO_BOARD_ID2 171
-static struct NS16550_plat serial_plat = {
- .clock = 48000000, /* 48MHz (APLL96/2) */
- .shift = 2,
-};
-
static int panda_console_init(void)
{
- /* Register the serial port */
- add_ns16550_device(DEVICE_ID_DYNAMIC, OMAP44XX_UART3_BASE, 1024,
- IORESOURCE_MEM_8BIT, &serial_plat);
+ omap44xx_add_uart3();
return 0;
}
@@ -160,13 +154,9 @@ static int panda_devices_init(void)
}
i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices));
- add_generic_device("i2c-omap", DEVICE_ID_DYNAMIC,
- NULL, 0x48070000, 0x1000,
- IORESOURCE_MEM, NULL);
-
+ omap44xx_add_i2c1(NULL);
+ omap44xx_add_mmc1(NULL);
- add_generic_device("omap-hsmmc", DEVICE_ID_DYNAMIC, NULL, 0x4809C100, SZ_4K,
- IORESOURCE_MEM, NULL);
panda_ehci_init();
panda_led_init();
diff --git a/arch/arm/boards/pcm049/board.c b/arch/arm/boards/pcm049/board.c
index 859ce3b..ca3f906 100644
--- a/arch/arm/boards/pcm049/board.c
+++ b/arch/arm/boards/pcm049/board.c
@@ -23,6 +23,7 @@
#include <asm/armlinux.h>
#include <generated/mach-types.h>
#include <mach/omap4-silicon.h>
+#include <mach/omap4-devices.h>
#include <mach/sdrc.h>
#include <mach/sys_info.h>
#include <mach/syslib.h>
@@ -38,16 +39,9 @@
#include <mach/xload.h>
#include <i2c/i2c.h>
-static struct NS16550_plat serial_plat = {
- .clock = 48000000, /* 48MHz (APLL96/2) */
- .shift = 2,
-};
-
static int pcm049_console_init(void)
{
- /* Register the serial port */
- add_ns16550_device(DEVICE_ID_DYNAMIC, OMAP44XX_UART3_BASE, 1024,
- IORESOURCE_MEM_8BIT, &serial_plat);
+ omap44xx_add_uart3();
return 0;
}
@@ -99,11 +93,8 @@ static struct gpmc_nand_platform_data nand_plat = {
static int pcm049_devices_init(void)
{
i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices));
- add_generic_device("i2c-omap", DEVICE_ID_DYNAMIC, NULL, 0x48070000, 0x1000,
- IORESOURCE_MEM, NULL);
-
- add_generic_device("omap-hsmmc", DEVICE_ID_DYNAMIC, NULL, 0x4809C100, SZ_4K,
- IORESOURCE_MEM, NULL);
+ omap44xx_add_i2c1(NULL);
+ omap44xx_add_mmc1(NULL);
gpmc_generic_init(0x10);
diff --git a/arch/arm/boards/phycard-a-xl2/pca-a-xl2.c b/arch/arm/boards/phycard-a-xl2/pca-a-xl2.c
index 26b31dd..3931f57 100644
--- a/arch/arm/boards/phycard-a-xl2/pca-a-xl2.c
+++ b/arch/arm/boards/phycard-a-xl2/pca-a-xl2.c
@@ -37,18 +37,12 @@
#include <mach/gpmc_nand.h>
#include <mach/xload.h>
#include <mach/omap_hsmmc.h>
+#include <mach/omap4-devices.h>
#include <i2c/i2c.h>
-static struct NS16550_plat serial_plat = {
- .clock = 48000000, /* 48MHz (APLL96/2) */
- .shift = 2,
-};
-
static int pcaaxl2_console_init(void)
{
- /* Register the serial port */
- add_ns16550_device(DEVICE_ID_DYNAMIC, OMAP44XX_UART3_BASE, 1024,
- IORESOURCE_MEM_8BIT, &serial_plat);
+ omap44xx_add_uart3();
return 0;
}
@@ -111,16 +105,14 @@ static int pcaaxl2_devices_init(void)
u32 value;
i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices));
- add_generic_device("i2c-omap", DEVICE_ID_DYNAMIC, NULL, 0x48070000, 0x1000,
- IORESOURCE_MEM, NULL);
+ omap44xx_add_i2c1(NULL);
value = readl(OMAP4_CONTROL_PBIASLITE);
value &= ~OMAP4_MMC1_PBIASLITE_VMODE;
value |= (OMAP4_MMC1_PBIASLITE_PWRDNZ | OMAP4_MMC1_PWRDNZ);
writel(value, OMAP4_CONTROL_PBIASLITE);
- add_generic_device("omap-hsmmc", DEVICE_ID_DYNAMIC, NULL, 0x4809C100, SZ_4K,
- IORESOURCE_MEM, &mmc_device);
+ omap44xx_add_mmc1(&mmc_device);
gpmc_generic_init(0x10);
--
1.7.10.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-12-18 14:23 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-18 14:22 AM33xx and BeagleBone support Jan Luebbe
2012-12-18 14:22 ` [PATCH 01/19] ARM omap: remove unused function Jan Luebbe
2012-12-18 14:22 ` [PATCH 02/19] ARM omap4: remove unused struct Jan Luebbe
2012-12-18 14:22 ` [PATCH 03/19] ARM omap4: Add missing assembly protection in header file Jan Luebbe
2012-12-18 14:22 ` [PATCH 04/19] ARM omap4: Add missing double include protection Jan Luebbe
2012-12-18 14:22 ` [PATCH 05/19] ARM omap: Make gpmc base runtime configurable Jan Luebbe
2012-12-18 14:22 ` [PATCH 06/19] ARM omap: Make timer " Jan Luebbe
2012-12-18 14:22 ` [PATCH 07/19] ARM omap4: make PRM defines SoC specific Jan Luebbe
2012-12-18 14:22 ` [PATCH 08/19] ARM omap3: " Jan Luebbe
2012-12-18 14:22 ` [PATCH 09/19] ARM omap: Use SoC specific defines for gpmc and timer base Jan Luebbe
2012-12-18 14:22 ` [PATCH 10/19] ARM omap: include individual SoC files Jan Luebbe
2012-12-18 14:22 ` [PATCH 11/19] ARM omap: Add device register convenience functions Jan Luebbe
2012-12-18 14:22 ` [PATCH 12/19] ARM omap3: Use device register functions in boards Jan Luebbe
2012-12-18 14:22 ` Jan Luebbe [this message]
2012-12-18 14:22 ` [PATCH 14/19] ARM omap hsmmc: Fix register offset Jan Luebbe
2012-12-18 14:22 ` [PATCH 15/19] ARM omap3: Add change OMAP_ prefix to OMAP3_ for registers Jan Luebbe
2012-12-18 14:22 ` [PATCH 16/19] ARM OMAP AM33XX: create new ARCH for AM33xx Jan Luebbe
2012-12-18 14:22 ` [PATCH 17/19] arm: omap: am33xx: add support for low level debug Jan Luebbe
2012-12-18 14:22 ` [PATCH 18/19] arm: beaglebone: add first-stage support for AM335x and board Jan Luebbe
2012-12-19 12:07 ` Teresa Gámez
2012-12-18 14:22 ` [PATCH 19/19] drivers: net: add driver for TI CPSW Jan Luebbe
2012-12-19 21:11 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1355840561-11552-14-git-send-email-jlu@pengutronix.de \
--to=jlu@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox