summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mvebu
diff options
context:
space:
mode:
authorSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>2014-04-10 16:48:08 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-06-24 08:25:42 +0200
commit8cd9edec989f02661e2d1f5e29979319fee287ce (patch)
treed97ef721e7db22fb5afb2689a0e44a726950a316 /arch/arm/mach-mvebu
parenta3b473e0d59c0b1aacd2c44f7807fcebe7e979c6 (diff)
downloadbarebox-8cd9edec989f02661e2d1f5e29979319fee287ce.tar.gz
barebox-8cd9edec989f02661e2d1f5e29979319fee287ce.tar.xz
ARM: mvebu: convert Kirkwood devices to be probed from DT
With Kirkwood DT files available, convert Kirkwood SoC init to register basic devices from DT only. Makefile targets for dtbs will be removed again as soon as MULTI_PBL is available. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Diffstat (limited to 'arch/arm/mach-mvebu')
-rw-r--r--arch/arm/mach-mvebu/kirkwood.c46
1 files changed, 0 insertions, 46 deletions
diff --git a/arch/arm/mach-mvebu/kirkwood.c b/arch/arm/mach-mvebu/kirkwood.c
index c79d13002a..fe9ca9cbe4 100644
--- a/arch/arm/mach-mvebu/kirkwood.c
+++ b/arch/arm/mach-mvebu/kirkwood.c
@@ -16,16 +16,9 @@
#include <common.h>
#include <init.h>
#include <io.h>
-#include <ns16550.h>
-#include <linux/clk.h>
-#include <linux/clkdev.h>
#include <asm/memory.h>
#include <mach/kirkwood-regs.h>
-#define CONSOLE_UART_BASE KIRKWOOD_UARTn_BASE(CONFIG_MVEBU_CONSOLE_UART)
-
-static struct clk *tclk;
-
static inline void kirkwood_memory_find(unsigned long *phys_base,
unsigned long *phys_size)
{
@@ -49,39 +42,6 @@ static inline void kirkwood_memory_find(unsigned long *phys_base,
}
}
-static struct NS16550_plat uart_plat = {
- .shift = 2,
-};
-
-static int kirkwood_add_uart(void)
-{
- uart_plat.clock = clk_get_rate(tclk);
- if (!add_ns16550_device(DEVICE_ID_DYNAMIC,
- (unsigned int)CONSOLE_UART_BASE, 32,
- IORESOURCE_MEM | IORESOURCE_MEM_32BIT,
- &uart_plat))
- return -ENODEV;
- return 0;
-}
-
-static int kirkwood_init_clocks(void)
-{
- u32 val = readl(KIRKWOOD_SAR_BASE);
- unsigned int rate;
-
- /*
- * On Kirkwood, the TCLK frequency can be either
- * 166 Mhz or 200 Mhz
- */
- if ((val & SAR_TCLK_FREQ) == SAR_TCLK_FREQ)
- rate = 166666667;
- else
- rate = 200000000;
-
- tclk = clk_fixed("tclk", rate);
- return 0;
-}
-
static int kirkwood_init_soc(void)
{
unsigned long phys_base, phys_size;
@@ -89,14 +49,8 @@ static int kirkwood_init_soc(void)
barebox_set_model("Marvell Kirkwood");
barebox_set_hostname("kirkwood");
- kirkwood_init_clocks();
- clkdev_add_physbase(tclk, (unsigned int)KIRKWOOD_TIMER_BASE, NULL);
- add_generic_device("orion-timer", DEVICE_ID_SINGLE, NULL,
- (unsigned int)KIRKWOOD_TIMER_BASE, 0x30,
- IORESOURCE_MEM, NULL);
kirkwood_memory_find(&phys_base, &phys_size);
arm_add_mem_device("ram0", phys_base, phys_size);
- kirkwood_add_uart();
return 0;
}