From 04cd4e7215d30431b736ef89c16d241c50a90c37 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Sun, 5 Feb 2017 10:52:12 +0900 Subject: ARM: uniphier: remove DRAM base address from board parameters The base address of each DRAM channel can be calculated from other parameters, so does not need hard-coding. What we need is the size of each DRAM channel and DRAM_SPARSE flag to decide the start address of DRAM channel 1. Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/init.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/arm/mach-uniphier/init.h') diff --git a/arch/arm/mach-uniphier/init.h b/arch/arm/mach-uniphier/init.h index 453e68a43e..c41a5df8e9 100644 --- a/arch/arm/mach-uniphier/init.h +++ b/arch/arm/mach-uniphier/init.h @@ -13,7 +13,6 @@ #define UNIPHIER_MAX_NR_DRAM_CH 3 struct uniphier_dram_ch { - unsigned long base; unsigned long size; unsigned int width; }; @@ -24,7 +23,8 @@ struct uniphier_board_data { struct uniphier_dram_ch dram_ch[UNIPHIER_MAX_NR_DRAM_CH]; unsigned int flags; -#define UNIPHIER_BD_DDR3PLUS BIT(2) +#define UNIPHIER_BD_DRAM_SPARSE BIT(9) +#define UNIPHIER_BD_DDR3PLUS BIT(8) #define UNIPHIER_BD_BOARD_GET_TYPE(f) ((f) & 0x7) #define UNIPHIER_BD_BOARD_LD20_REF 0 /* LD20 reference */ -- cgit From 784548efb2b76fdbfdb73f6a505a156f90bb1e55 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 14 Feb 2017 01:24:26 +0900 Subject: ARM: uniphier: rework spl_boot_device() and related code The current implementation has ugly switch statements here and there, and duplicates similar code. Rework it using table lookups for SoC data and reduce code duplication. Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/init.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/arm/mach-uniphier/init.h') diff --git a/arch/arm/mach-uniphier/init.h b/arch/arm/mach-uniphier/init.h index c41a5df8e9..6691d446c6 100644 --- a/arch/arm/mach-uniphier/init.h +++ b/arch/arm/mach-uniphier/init.h @@ -120,11 +120,14 @@ void uniphier_pro5_clk_init(void); void uniphier_pxs2_clk_init(void); void uniphier_ld11_clk_init(void); +unsigned int uniphier_boot_device_raw(void); int uniphier_pin_init(const char *pinconfig_name); void uniphier_smp_kick_all_cpus(void); void cci500_init(int nr_slaves); +#undef pr_warn #define pr_warn(fmt, args...) printf(fmt, ##args) +#undef pr_err #define pr_err(fmt, args...) printf(fmt, ##args) #endif /* __MACH_INIT_H */ -- cgit From dd38374d2f1d89fb34d4c544f558537db1966a33 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 16 Feb 2017 15:59:32 +0900 Subject: ARM: uniphier: remove dram_nr_ch from board parameters This parameter is redundant because we can know the number of channels by checking if dram_ch[2].size is zero. Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/init.h | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/arm/mach-uniphier/init.h') diff --git a/arch/arm/mach-uniphier/init.h b/arch/arm/mach-uniphier/init.h index 6691d446c6..be0ad6c374 100644 --- a/arch/arm/mach-uniphier/init.h +++ b/arch/arm/mach-uniphier/init.h @@ -19,7 +19,6 @@ struct uniphier_dram_ch { struct uniphier_board_data { unsigned int dram_freq; - unsigned int dram_nr_ch; struct uniphier_dram_ch dram_ch[UNIPHIER_MAX_NR_DRAM_CH]; unsigned int flags; -- cgit From c21f58548c812032207d986ca7b5baa0bb4a5972 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 17 Feb 2017 16:17:22 +0900 Subject: ARM: uniphier: deassert RST_n of eMMC device for LD11/LD20 For LD11 and LD20 SoCs, the RST_n pin is asserted by default. If the EXT_CSD[162], bit[1:0] (RST_n_ENABLE) is fused, the eMMC device would stay in the reset state until its RST_n pin is deasserted by software. Currently, this is cared by an ad-hoc way because the eMMC hardware reset provider is not supported in U-Boot for now. This code should be re-written once the "mmc-pwrseq-emmc" binding is supported. Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/init.h | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/mach-uniphier/init.h') diff --git a/arch/arm/mach-uniphier/init.h b/arch/arm/mach-uniphier/init.h index be0ad6c374..5c45f2d31b 100644 --- a/arch/arm/mach-uniphier/init.h +++ b/arch/arm/mach-uniphier/init.h @@ -118,6 +118,7 @@ void uniphier_pro4_clk_init(void); void uniphier_pro5_clk_init(void); void uniphier_pxs2_clk_init(void); void uniphier_ld11_clk_init(void); +void uniphier_ld20_clk_init(void); unsigned int uniphier_boot_device_raw(void); int uniphier_pin_init(const char *pinconfig_name); -- cgit