From: Andrey Panov <rockford@yandex.ru>
To: barebox@lists.infradead.org
Subject: [PATCH v2 16/18] ARM: Rockchip: Update Radxa Rock board
Date: Wed, 4 Mar 2015 23:11:44 +0300 [thread overview]
Message-ID: <1425499906-32125-17-git-send-email-rockford@yandex.ru> (raw)
In-Reply-To: <1425499906-32125-1-git-send-email-rockford@yandex.ru>
Signed-off-by: Andrey Panov <rockford@yandex.ru>
---
arch/arm/boards/radxa-rock/board.c | 35 ++++++--------------------
arch/arm/boards/radxa-rock/env/boot/mshc1 | 9 +++++++
arch/arm/boards/radxa-rock/env/boot/mshc1-old | 8 ++++++
arch/arm/boards/radxa-rock/env/init/bootsource | 7 ++++++
arch/arm/boards/radxa-rock/env/nv/hostname | 1 +
5 files changed, 32 insertions(+), 28 deletions(-)
create mode 100644 arch/arm/boards/radxa-rock/env/boot/mshc1
create mode 100644 arch/arm/boards/radxa-rock/env/boot/mshc1-old
create mode 100644 arch/arm/boards/radxa-rock/env/init/bootsource
create mode 100644 arch/arm/boards/radxa-rock/env/nv/hostname
diff --git a/arch/arm/boards/radxa-rock/board.c b/arch/arm/boards/radxa-rock/board.c
index 3d9b5be..ec053f9 100644
--- a/arch/arm/boards/radxa-rock/board.c
+++ b/arch/arm/boards/radxa-rock/board.c
@@ -16,8 +16,9 @@
#include <io.h>
#include <i2c/i2c.h>
#include <i2c/i2c-gpio.h>
-#include <mach/rockchip-pll.h>
+#include <mach/rockchip-regs.h>
#include <mfd/act8846.h>
+#include <asm/armlinux.h>
static struct i2c_board_info radxa_rock_i2c_devices[] = {
{
@@ -43,20 +44,6 @@ static void radxa_rock_pmic_init(void)
act8846_set_bits(pmic, ACT8846_LDO9_CTRL, BIT(7), BIT(7));
}
-static int setup_plls(void)
-{
- if (!of_machine_is_compatible("radxa,rock"))
- return 0;
-
- /* Codec PLL frequency: 594 MHz */
- rk3188_pll_set_parameters(RK3188_CPLL, 2, 198, 4);
- /* General PLL frequency: 300 MHz */
- rk3188_pll_set_parameters(RK3188_GPLL, 1, 50, 4);
-
- return 0;
-}
-coredevice_initcall(setup_plls);
-
static int devices_init(void)
{
if (!of_machine_is_compatible("radxa,rock"))
@@ -68,20 +55,12 @@ static int devices_init(void)
radxa_rock_pmic_init();
- /* Set mac_pll divisor to 6 (50MHz output) */
- writel((5 << 8) | (0x1f << 24), 0x20000098);
+ armlinux_set_architecture(3066);
- return 0;
-}
-device_initcall(devices_init);
-
-static int hostname_init(void)
-{
- if (!of_machine_is_compatible("radxa,rock"))
- return 0;
-
- barebox_set_hostname("radxa-rock");
+ /* Map SRAM to address 0, kernel relies on this */
+ writel((RK_SOC_CON0_REMAP << 16) | RK_SOC_CON0_REMAP,
+ RK_GRF_BASE + RK_GRF_SOC_CON0);
return 0;
}
-postcore_initcall(hostname_init);
+device_initcall(devices_init);
diff --git a/arch/arm/boards/radxa-rock/env/boot/mshc1 b/arch/arm/boards/radxa-rock/env/boot/mshc1
new file mode 100644
index 0000000..964b6cc
--- /dev/null
+++ b/arch/arm/boards/radxa-rock/env/boot/mshc1
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+mount /dev/mshc1.0
+
+oftree -f
+oftree -l /mnt/mshc1.0/rk3188-radxarock.dtb
+
+global.bootm.image=/mnt/mshc1.0/zImage
+global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rootwait"
diff --git a/arch/arm/boards/radxa-rock/env/boot/mshc1-old b/arch/arm/boards/radxa-rock/env/boot/mshc1-old
new file mode 100644
index 0000000..1e1b577
--- /dev/null
+++ b/arch/arm/boards/radxa-rock/env/boot/mshc1-old
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+mount /dev/mshc1.0
+
+oftree -f
+
+global.bootm.image=/mnt/mshc1.0/zImage-old
+global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rootwait"
diff --git a/arch/arm/boards/radxa-rock/env/init/bootsource b/arch/arm/boards/radxa-rock/env/init/bootsource
new file mode 100644
index 0000000..4e8299b
--- /dev/null
+++ b/arch/arm/boards/radxa-rock/env/init/bootsource
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if [ -n "$nv.boot.default" ]; then
+ exit
+fi
+
+global.boot.default=mshc1
diff --git a/arch/arm/boards/radxa-rock/env/nv/hostname b/arch/arm/boards/radxa-rock/env/nv/hostname
new file mode 100644
index 0000000..16523ac
--- /dev/null
+++ b/arch/arm/boards/radxa-rock/env/nv/hostname
@@ -0,0 +1 @@
+radxa-rock
--
2.1.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2015-03-04 20:12 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-04 20:11 [PATCH v2 00/18] Update support for RK3188, " Andrey Panov
2015-03-04 20:11 ` [PATCH v2 01/18] lib: Add gcd() function Andrey Panov
2015-03-04 20:11 ` [PATCH v2 02/18] CLK: Add support for composite clock from Linux kernel Andrey Panov
2015-03-04 20:11 ` [PATCH v2 03/18] CLK: Add fractional divider clock support " Andrey Panov
2015-03-04 20:11 ` [PATCH v2 04/18] CLK: clk-mux: Respect CLK_MUX_HIWORD_MASK flag Andrey Panov
2015-03-04 20:11 ` [PATCH v2 05/18] CLK: clk-divider: Respect CLK_DIVIDER_HIWORD_MASK flag Andrey Panov
2015-03-04 20:11 ` [PATCH v2 06/18] CLK: clk-divider: Introduce clk_divider_alloc() and *_free() routines Andrey Panov
2015-03-04 20:11 ` [PATCH v2 07/18] CLK: clk-divider: Respect CLK_DIVIDER_POWER_OF_TWO flag Andrey Panov
2015-03-04 20:11 ` [PATCH v2 08/18] CLK: Check and do not allow to register clock twice Andrey Panov
2015-03-04 20:11 ` [PATCH v2 09/18] CLK: Add helper defines to barebox-wrapper.h for easier porting of drivers from Linux kernel Andrey Panov
2015-03-04 20:11 ` [PATCH v2 10/18] NET: arc_emac: Update for newer DTS, support for Rockchip .compatible Andrey Panov
2015-03-04 20:11 ` [PATCH v2 11/18] MMC: dw_mmc: Add support for PIO mode and Rockchip variant of this hardware Andrey Panov
2015-03-04 20:11 ` [PATCH v2 12/18] ARM: Rockchip: Remove unused files from mach-rockchip Andrey Panov
2015-03-04 20:11 ` [PATCH v2 13/18] ARM: Rockchip: Update Kconfig Andrey Panov
2015-03-04 20:11 ` [PATCH v2 14/18] ARM: Rockchip: Update clk driver from Linux kernel for use with newer DTS Andrey Panov
2015-03-04 20:11 ` [PATCH v2 15/18] ARM: Rockchip: Use newer DTS for Radxa Rock board Andrey Panov
2015-03-04 20:11 ` Andrey Panov [this message]
2015-03-04 20:11 ` [PATCH v2 17/18] ARM: Rockchip: Add Radxa Rock defconfig Andrey Panov
2015-03-04 20:11 ` [PATCH v2 18/18] ARM: Rockchip: Add documentation Andrey Panov
2015-03-05 8:44 ` [PATCH v2 00/18] Update support for RK3188, Radxa Rock board Sascha Hauer
2015-03-05 18:46 ` Панов Андрей
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=1425499906-32125-17-git-send-email-rockford@yandex.ru \
--to=rockford@yandex.ru \
--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