summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/friendlyarm-tiny210
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/boards/friendlyarm-tiny210')
-rw-r--r--arch/arm/boards/friendlyarm-tiny210/Makefile2
-rw-r--r--arch/arm/boards/friendlyarm-tiny210/config.h19
-rw-r--r--arch/arm/boards/friendlyarm-tiny210/lowlevel.c114
-rw-r--r--arch/arm/boards/friendlyarm-tiny210/tiny210.c117
4 files changed, 0 insertions, 252 deletions
diff --git a/arch/arm/boards/friendlyarm-tiny210/Makefile b/arch/arm/boards/friendlyarm-tiny210/Makefile
deleted file mode 100644
index 7deb178739..0000000000
--- a/arch/arm/boards/friendlyarm-tiny210/Makefile
+++ /dev/null
@@ -1,2 +0,0 @@
-obj-y += tiny210.o
-lwl-y += lowlevel.o
diff --git a/arch/arm/boards/friendlyarm-tiny210/config.h b/arch/arm/boards/friendlyarm-tiny210/config.h
deleted file mode 100644
index 86aedf0a64..0000000000
--- a/arch/arm/boards/friendlyarm-tiny210/config.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#define S5PCXX_CLOCK_REFERENCE 24000000
-
-#define set_pll(mdiv, pdiv, sdiv) (1<<31 | mdiv<<16 | pdiv<<8 | sdiv)
-
-#define BOARD_APLL_VAL set_pll(0x7d, 0x3, 0x1)
-#define BOARD_MPLL_VAL set_pll(0x29b, 0xc, 0x1)
-#define BOARD_EPLL_VAL set_pll(0x60, 0x6, 0x2)
-#define BOARD_VPLL_VAL set_pll(0x6c, 0x6, 0x3)
-
-#define BOARD_CLK_DIV0_MASK 0xFFFFFFFF
-#define BOARD_CLK_DIV0_VAL 0x14131440
-#define BOARD_APLL_LOCKTIME 0x2cf
-
-#define S5P_DRAM_WR 3
-#define S5P_DRAM_CAS 4
-#define DMC_TIMING_AREF 0x00000618
-#define DMC_TIMING_ROW 0x2B34438A
-#define DMC_TIMING_DATA 0x24240000
-#define DMC_TIMING_PWR 0x0BDC0343
diff --git a/arch/arm/boards/friendlyarm-tiny210/lowlevel.c b/arch/arm/boards/friendlyarm-tiny210/lowlevel.c
deleted file mode 100644
index 17a7cf1591..0000000000
--- a/arch/arm/boards/friendlyarm-tiny210/lowlevel.c
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (C) 2012 Alexey Galakhov
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#include <config.h>
-#include <common.h>
-#include <init.h>
-#include <io.h>
-#include <linux/sizes.h>
-#include <asm/barebox-arm.h>
-#include <asm/barebox-arm-head.h>
-#include <asm/sections.h>
-#include <mach/s3c-iomap.h>
-#include <mach/s3c-clocks.h>
-#include <mach/s3c-generic.h>
-
-#define IRAM_CODE_BASE 0xD0020010
-
-/* Tiny210 has 4 leds numbered from 0 to 3 at GPJ2 */
-static inline void __bare_init debug_led(int led, bool state)
-{
- uint32_t r;
- /* GPJ2CON: mode 0001=output */
- r = readl(0xE0200280);
- r &= ~(0xF << (4 * led));
- r |= (0x1 << (4 * led));
- writel(r, 0xE0200280);
- /* GPJ2DAT: active low */
- r = readl(0xE0200284);
- r &= ~(1 << led);
- r |= (state ? 0 : 1) << led;
- writel(r, 0xE0200284);
-}
-
-/*
- * iROM boot from MMC
- * TODO: replace this by native boot
- */
-
-#define ADDR_V210_SDMMC_BASE 0xD0037488
-#define ADDR_CopySDMMCtoMem 0xD0037F98
-
-static int __bare_init s5p_irom_load_mmc(void *dest, uint32_t start_block,
- uint16_t block_count)
-{
- typedef uint32_t (*func_t) (int32_t, uint32_t, uint16_t, uint32_t*, int8_t);
- uint32_t chbase = readl(ADDR_V210_SDMMC_BASE);
- func_t func = (func_t)readl(ADDR_CopySDMMCtoMem);
- int chan = (chbase - 0xEB000000) >> 20;
- if (chan != 0 && chan != 2)
- return 0;
- return func(chan, start_block, block_count, (uint32_t*)dest, 0) ? 1 : 0;
-}
-
-static __bare_init __naked void jump_sdram(unsigned long offset)
-{
- __asm__ __volatile__ (
- "sub lr, lr, %0;"
- "mov pc, lr;" : : "r"(offset)
- );
-}
-
-static __bare_init bool load_stage2(void *dest, size_t size)
-{
- /* TODO add other ways to boot */
- return s5p_irom_load_mmc(dest, 1, (size+ 511) / 512);
-}
-
-void __bare_init barebox_arm_reset_vector(uint32_t r0, uint32_t r1, uint32_t r2)
-{
- arm_cpu_lowlevel_init();
-
-#ifdef CONFIG_S3C_PLL_INIT
- s5p_init_pll();
-#endif
-
- debug_led(0, 1);
-
- if (get_pc() < IRAM_CODE_BASE) /* Are we running from iRAM? */
- /* No, we don't. */
- goto boot;
-
- s5p_init_dram_bank_ddr2(S5P_DMC0_BASE, 0x20E00323, 0, 0);
-
- debug_led(1, 1);
-
- if (! load_stage2((void*)(_text - 16),
- barebox_image_size + 16)) {
- debug_led(3, 1);
- while (1) { } /* hang */
- }
-
- debug_led(2, 1);
-
- jump_sdram(IRAM_CODE_BASE - (unsigned long)_text);
-
- debug_led(1, 0);
-
-boot:
- barebox_arm_entry(S3C_SDRAM_BASE, SZ_256M, NULL);
-}
diff --git a/arch/arm/boards/friendlyarm-tiny210/tiny210.c b/arch/arm/boards/friendlyarm-tiny210/tiny210.c
deleted file mode 100644
index b40dc98c5b..0000000000
--- a/arch/arm/boards/friendlyarm-tiny210/tiny210.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (C) 2012 Alexey Galakhov
- * Based on Mini6410 code by Juergen Beisert
- *
- * Copyright (C) 2012 Juergen Beisert, Pengutronix
- *
- * In some ways inspired by code
- *
- * (C) Copyright 2002
- * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
- * Marius Groeger <mgroeger@sysgo.de>
- *
- * (C) Copyright 2002
- * David Mueller, ELSOFT AG, <d.mueller@elsoft.ch>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#include <common.h>
-#include <driver.h>
-#include <init.h>
-#include <linux/sizes.h>
-#include <generated/mach-types.h>
-#include <gpio.h>
-#include <led.h>
-#include <io.h>
-#include <nand.h>
-#include <asm/armlinux.h>
-#include <mach/iomux.h>
-#include <mach/s3c-iomap.h>
-#include <mach/s3c-clocks.h>
-#include <mach/s3c-generic.h>
-
-
-static const unsigned pin_usage[] = {
- /* TODO */
-};
-
-static struct gpio_led leds[] = {
- {
- .gpio = GPJ20,
- .led = {
- .name = "led1",
- }
- }, {
- .gpio = GPJ21,
- .led = {
- .name = "led2",
- }
- }, {
- .gpio = GPJ22,
- .led = {
- .name = "led3",
- }
- }, {
- .gpio = GPJ23,
- .led = {
- .name = "led4",
- }
- }
-};
-
-static int tiny210_mem_init(void)
-{
- arm_add_mem_device("ram0", S3C_SDRAM_BASE, s5p_get_memory_size());
- return 0;
-}
-mem_initcall(tiny210_mem_init);
-
-static int tiny210_console_init(void)
-{
- /*
- * configure the UART1 right now, as barebox will
- * start to send data immediately
- */
- s3c_gpio_mode(GPA00_RXD0 | ENABLE_PU);
- s3c_gpio_mode(GPA01_TXD0);
- s3c_gpio_mode(GPA02_NCTS0 | ENABLE_PU);
- s3c_gpio_mode(GPA03_NRTS0);
-
- barebox_set_model("Friendlyarm tiny210");
- barebox_set_hostname("tiny210");
-
- add_generic_device("s3c_serial", DEVICE_ID_DYNAMIC, NULL,
- S3C_UART1_BASE, S3C_UART1_SIZE,
- IORESOURCE_MEM, NULL);
- return 0;
-}
-console_initcall(tiny210_console_init);
-
-static int tiny210_devices_init(void)
-{
- int i;
- for (i = 0; i < ARRAY_SIZE(pin_usage); i++)
- s3c_gpio_mode(pin_usage[i]);
-
- for (i = 0; i < ARRAY_SIZE(leds); i++) {
- leds[i].active_low = 1;
- gpio_direction_output(leds[i].gpio, leds[i].active_low);
- led_gpio_register(&leds[i]);
- }
-
- led_set_trigger(LED_TRIGGER_HEARTBEAT, &leds[0].led);
-
- armlinux_set_architecture(MACH_TYPE_MINI210);
-
- return 0;
-}
-device_initcall(tiny210_devices_init);