diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2016-05-09 08:49:42 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-05-09 08:49:42 +0200 |
commit | 23debc6fd917f6d560c665b19eff41c43c1610e9 (patch) | |
tree | 37f82227de0586636bc1213c1dd74a12566dbddc | |
parent | f5142b8564005d95324e4c326dbc390ce85e8bef (diff) | |
parent | 63ae16da82c3242970195ed9c41182a84a9d6c72 (diff) | |
download | barebox-23debc6fd917f6d560c665b19eff41c43c1610e9.tar.gz barebox-23debc6fd917f6d560c665b19eff41c43c1610e9.tar.xz |
Merge branch 'for-next/arm'
44 files changed, 236 insertions, 196 deletions
diff --git a/arch/arm/boards/phytec-som-am335x/lowlevel.c b/arch/arm/boards/phytec-som-am335x/lowlevel.c index 73e75eb491..33e83c5a8e 100644 --- a/arch/arm/boards/phytec-som-am335x/lowlevel.c +++ b/arch/arm/boards/phytec-som-am335x/lowlevel.c @@ -125,6 +125,7 @@ PHYTEC_ENTRY_MLO(start_am33xx_phytec_phycore_sram_2x512mb, am335x_phytec_phycore PHYTEC_ENTRY_MLO(start_am33xx_phytec_phycore_sram_1024mb, am335x_phytec_phycore_som_mlo, PHYCORE_IM8G16D3FBBG15EI_1024MB); PHYTEC_ENTRY_MLO(start_am33xx_phytec_phycore_r2_sram_512mb, am335x_phytec_phycore_som_mlo, PHYCORE_R2_MT41K256M16TW107IT_512MB); PHYTEC_ENTRY_MLO(start_am33xx_phytec_phycore_r2_sram_256mb, am335x_phytec_phycore_som_mlo, PHYCORE_R2_MT41K128M16JT_256MB); +PHYTEC_ENTRY_MLO(start_am33xx_phytec_phycore_r2_sram_1024mb, am335x_phytec_phycore_som_mlo, PHYCORE_R2_MT41K512M16HA125IT_1024MB); PHYTEC_ENTRY(start_am33xx_phytec_phycore_sdram, am335x_phytec_phycore_som); PHYTEC_ENTRY(start_am33xx_phytec_phycore_no_spi_sdram, am335x_phytec_phycore_som_no_spi); PHYTEC_ENTRY(start_am33xx_phytec_phycore_no_eeprom_sdram, am335x_phytec_phycore_som_no_eeprom); diff --git a/arch/arm/boards/phytec-som-am335x/ram-timings.h b/arch/arm/boards/phytec-som-am335x/ram-timings.h index 884874caf7..9576d265e5 100644 --- a/arch/arm/boards/phytec-som-am335x/ram-timings.h +++ b/arch/arm/boards/phytec-som-am335x/ram-timings.h @@ -32,6 +32,7 @@ enum { PHYCORE_IM8G16D3FBBG15EI_1024MB, PHYCORE_R2_MT41K256M16TW107IT_512MB, PHYCORE_R2_MT41K128M16JT_256MB, + PHYCORE_R2_MT41K512M16HA125IT_1024MB, PHYCARD_NT5CB128M16BP_256MB, }; @@ -232,6 +233,25 @@ struct am335x_sdram_timings physom_timings[] = { .wr_slave_ratio0 = 0x73, }, }, + + /* 1024MB R2 */ + [PHYCORE_R2_MT41K512M16HA125IT_1024MB] = { + .regs = { + .emif_read_latency = 0x7, + .emif_tim1 = 0x0AAAD4DB, + .emif_tim2 = 0x268F7FDA, + .emif_tim3 = 0x501F88BF, + .sdram_config = 0x61C053B2, + .zq_config = 0x50074BE4, + .sdram_ref_ctrl = 0x00000C30, + }, + .data = { + .rd_slave_ratio0 = 0x38, + .wr_dqs_slave_ratio0 = 0x4d, + .fifo_we_slave_ratio0 = 0x9d, + .wr_slave_ratio0 = 0x82, + }, + }, }; #endif diff --git a/arch/arm/dts/am335x-phytec-phycard-som.dtsi b/arch/arm/dts/am335x-phytec-phycard-som.dtsi index d1dfa86bca..f052f0cc3a 100644 --- a/arch/arm/dts/am335x-phytec-phycard-som.dtsi +++ b/arch/arm/dts/am335x-phytec-phycard-som.dtsi @@ -185,42 +185,42 @@ reg = <0x0 0x20000>; }; - partition@1 { + partition@20000 { label = "xload_backup1"; reg = <0x20000 0x20000>; }; - partition@2 { + partition@40000 { label = "xload_backup2"; reg = <0x40000 0x20000>; }; - partition@3 { + partition@60000 { label = "xload_backup3"; reg = <0x60000 0x20000>; }; - partition@4 { + partition@80000 { label = "barebox"; reg = <0x80000 0x80000>; }; - partition@5 { + partition@100000 { label = "bareboxenv"; reg = <0x100000 0x40000>; }; - partition@6 { + partition@140000 { label = "oftree"; reg = <0x140000 0x40000>; }; - partition@7 { + partition@180000 { label = "kernel"; reg = <0x180000 0x800000>; }; - partition@8 { + partition@980000 { label = "root"; reg = <0x980000 0x0>; }; diff --git a/arch/arm/dts/am335x-phytec-phycore-som.dtsi b/arch/arm/dts/am335x-phytec-phycore-som.dtsi index f3a1d4d45a..e48d545e64 100644 --- a/arch/arm/dts/am335x-phytec-phycore-som.dtsi +++ b/arch/arm/dts/am335x-phytec-phycore-som.dtsi @@ -174,22 +174,22 @@ reg = <0x0 0x20000>; }; - partition@1 { + partition@20000 { label = "barebox"; reg = <0x20000 0x80000>; }; - partition@2 { + partition@a0000 { label = "bareboxenv"; reg = <0xa0000 0x20000>; }; - partition@3 { + partition@c0000 { label = "oftree"; reg = <0xc0000 0x20000>; }; - partition@4 { + partition@e0000 { label = "kernel"; reg = <0xe0000 0x0>; }; @@ -269,42 +269,42 @@ reg = <0x0 0x20000>; }; - partition@1 { + partition@20000 { label = "xload_backup1"; reg = <0x20000 0x20000>; }; - partition@2 { + partition@40000 { label = "xload_backup2"; reg = <0x40000 0x20000>; }; - partition@3 { + partition@60000 { label = "xload_backup3"; reg = <0x60000 0x20000>; }; - partition@4 { + partition@80000 { label = "barebox"; reg = <0x80000 0x80000>; }; - partition@5 { + partition@100000 { label = "bareboxenv"; reg = <0x100000 0x40000>; }; - partition@6 { + partition@140000 { label = "oftree"; reg = <0x140000 0x40000>; }; - partition@7 { + partition@180000 { label = "kernel"; reg = <0x180000 0x800000>; }; - partition@8 { + partition@980000 { label = "root"; /* * Size 0x0 extends partition to diff --git a/arch/arm/dts/am335x-phytec-phyflex-som.dtsi b/arch/arm/dts/am335x-phytec-phyflex-som.dtsi index c60943ccec..6561625686 100644 --- a/arch/arm/dts/am335x-phytec-phyflex-som.dtsi +++ b/arch/arm/dts/am335x-phytec-phyflex-som.dtsi @@ -165,22 +165,22 @@ reg = <0x0 0x20000>; }; - partition@1 { + partition@20000 { label = "barebox"; reg = <0x20000 0x80000>; }; - partition@2 { + partition@a0000 { label = "bareboxenv"; reg = <0xa0000 0x20000>; }; - partition@3 { + partition@c0000 { label = "oftree"; reg = <0xc0000 0x20000>; }; - partition@4 { + partition@e0000 { label = "kernel"; reg = <0xe0000 0x0>; }; @@ -283,42 +283,42 @@ reg = <0x0 0x20000>; }; - partition@1 { + partition@20000 { label = "xload_backup1"; reg = <0x20000 0x20000>; }; - partition@2 { + partition@40000 { label = "xload_backup2"; reg = <0x40000 0x20000>; }; - partition@3 { + partition@60000 { label = "xload_backup3"; reg = <0x60000 0x20000>; }; - partition@4 { + partition@80000 { label = "barebox"; reg = <0x80000 0x80000>; }; - partition@5 { + partition@100000 { label = "bareboxenv"; reg = <0x100000 0x40000>; }; - partition@6 { + partition@140000 { label = "oftree"; reg = <0x140000 0x40000>; }; - partition@7 { + partition@180000 { label = "kernel"; reg = <0x180000 0x800000>; }; - partition@8 { + partition@980000 { label = "root"; reg = <0x980000 0x0>; }; diff --git a/arch/arm/dts/imx25-karo-tx25.dts b/arch/arm/dts/imx25-karo-tx25.dts index d661463282..8d79471a30 100644 --- a/arch/arm/dts/imx25-karo-tx25.dts +++ b/arch/arm/dts/imx25-karo-tx25.dts @@ -126,17 +126,17 @@ reg = <0x0 0x80000>; }; - partition@1 { + partition@80000 { label = "environment"; reg = <0x80000 0x80000>; }; - partition@2 { + partition@100000 { label = "kernel"; reg = <0x100000 0x400000>; }; - partition@3 { + partition@500000 { label = "root"; reg = <0x500000 0x7b00000>; }; diff --git a/arch/arm/dts/imx27-phytec-phycard-s-rdk-bb.dts b/arch/arm/dts/imx27-phytec-phycard-s-rdk-bb.dts index 3ea1b5b052..cb02a1dfce 100644 --- a/arch/arm/dts/imx27-phytec-phycard-s-rdk-bb.dts +++ b/arch/arm/dts/imx27-phytec-phycard-s-rdk-bb.dts @@ -18,20 +18,20 @@ &nfc { partition@0 { label = "boot"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; - partition@1 { + partition@e0000 { label = "environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; - partition@2 { + partition@100000 { label = "kernel"; reg = <0x100000 0x400000>; }; - partition@3 { + partition@500000 { label = "root"; reg = <0x500000 0x7b00000>; }; diff --git a/arch/arm/dts/imx27-phytec-phycore-rdk.dts b/arch/arm/dts/imx27-phytec-phycore-rdk.dts index f602045c7e..fff154cb97 100644 --- a/arch/arm/dts/imx27-phytec-phycore-rdk.dts +++ b/arch/arm/dts/imx27-phytec-phycore-rdk.dts @@ -32,17 +32,17 @@ reg = <0x00000000 0x00080000>; }; - environment_nand: partition@1 { + environment_nand: partition@80000 { label = "env"; reg = <0x00080000 0x00020000>; }; - partition@2 { + partition@a0000 { label = "kernel"; reg = <0x000a0000 0x00400000>; }; - partition@3 { + partition@4a0000 { label = "root"; reg = <0x004a0000 0>; }; @@ -54,17 +54,17 @@ reg = <0x00000000 0x00080000>; }; - environment_nor: partition@1 { + environment_nor: partition@80000 { label = "env"; reg = <0x00080000 0x00020000>; }; - partition@2 { + partition@a0000 { label = "kernel"; reg = <0x000a0000 0x00400000>; }; - partition@3 { + partition@4a0000 { label = "root"; reg = <0x004a0000 0>; }; diff --git a/arch/arm/dts/imx51-babbage.dts b/arch/arm/dts/imx51-babbage.dts index f8402ca8fa..bde3031d1b 100644 --- a/arch/arm/dts/imx51-babbage.dts +++ b/arch/arm/dts/imx51-babbage.dts @@ -27,9 +27,9 @@ #address-cells = <1>; #size-cells = <1>; - environment_esdhc1: partition@0 { + environment_esdhc1: partition@e0000 { label = "barebox-environment"; - reg = <0x80000 0x20000>; + reg = <0xe0000 0x20000>; }; }; diff --git a/arch/arm/dts/imx51-genesi-efika-sb.dts b/arch/arm/dts/imx51-genesi-efika-sb.dts index 78cb1b7184..5a2c3a1c40 100644 --- a/arch/arm/dts/imx51-genesi-efika-sb.dts +++ b/arch/arm/dts/imx51-genesi-efika-sb.dts @@ -415,9 +415,9 @@ #address-cells = <1>; #size-cells = <1>; - partition@0 { + partition@e0000 { label = "barebox-environment"; - reg = <0xc0000 0x40000>; + reg = <0xe0000 0x20000>; }; }; @@ -533,9 +533,9 @@ #address-cells = <1>; #size-cells = <1>; - partition@0 { + partition@e0000 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; }; }; diff --git a/arch/arm/dts/imx53-ccxmx53.dtsi b/arch/arm/dts/imx53-ccxmx53.dtsi index e4b4e54928..2ed24b65e4 100644 --- a/arch/arm/dts/imx53-ccxmx53.dtsi +++ b/arch/arm/dts/imx53-ccxmx53.dtsi @@ -233,20 +233,20 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; - partition@1 { + partition@e0000 { label = "environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; - partition@2 { + partition@100000 { label = "kernel"; reg = <0x100000 0x400000>; }; - partition@3 { + partition@500000 { label = "rootfs"; reg = <0x500000 0x0>; }; diff --git a/arch/arm/dts/imx53-guf-vincell-lt.dts b/arch/arm/dts/imx53-guf-vincell-lt.dts index a577ab262e..bcc378d07f 100644 --- a/arch/arm/dts/imx53-guf-vincell-lt.dts +++ b/arch/arm/dts/imx53-guf-vincell-lt.dts @@ -361,15 +361,15 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; - bareboxenv: partition@1 { + bareboxenv: partition@e0000 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; - partition@2 { + partition@100000 { label = "ubi"; reg = <0x100000 0x0>; }; diff --git a/arch/arm/dts/imx53-mba53.dts b/arch/arm/dts/imx53-mba53.dts index c908c61671..28f463c451 100644 --- a/arch/arm/dts/imx53-mba53.dts +++ b/arch/arm/dts/imx53-mba53.dts @@ -28,9 +28,9 @@ #address-cells = <1>; #size-cells = <1>; - partition@0 { + partition@e0000 { label = "environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; }; diff --git a/arch/arm/dts/imx53-qsb-common.dtsi b/arch/arm/dts/imx53-qsb-common.dtsi index 85e1b8bd01..f363af975d 100644 --- a/arch/arm/dts/imx53-qsb-common.dtsi +++ b/arch/arm/dts/imx53-qsb-common.dtsi @@ -43,9 +43,9 @@ #address-cells = <1>; #size-cells = <1>; - bareboxenv: partition@0 { + bareboxenv: partition@e0000 { label = "barebox-environment"; - reg = <0x80000 0x20000>; + reg = <0xe0000 0x20000>; }; }; diff --git a/arch/arm/dts/imx53-voipac-dmm-668.dtsi b/arch/arm/dts/imx53-voipac-dmm-668.dtsi index 6f76d2867a..e91c7d02a2 100644 --- a/arch/arm/dts/imx53-voipac-dmm-668.dtsi +++ b/arch/arm/dts/imx53-voipac-dmm-668.dtsi @@ -15,20 +15,20 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; - partition@1 { + partition@e0000 { label = "environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; - partition@2 { + partition@100000 { label = "kernel"; reg = <0x100000 0x400000>; }; - partition@3 { + partition@500000 { label = "rootfs"; reg = <0x500000 0x07B00000>; }; diff --git a/arch/arm/dts/imx6dl-eltec-hipercam.dts b/arch/arm/dts/imx6dl-eltec-hipercam.dts index f272e78a59..4fe174437e 100644 --- a/arch/arm/dts/imx6dl-eltec-hipercam.dts +++ b/arch/arm/dts/imx6dl-eltec-hipercam.dts @@ -37,15 +37,15 @@ partition@0 { label = "barebox"; - reg = <0x0 0xc0000>; + reg = <0x0 0xe0000>; }; - environment_nor0: partition@1 { + environment_nor0: partition@e0000 { label = "bareboxenv"; - reg = <0xc0000 0x8000>; + reg = <0xe0000 0x20000>; }; - partition@2 { + partition@100000 { label = "persistent"; reg = <0x100000 0xf00000>; }; diff --git a/arch/arm/dts/imx6dl-hummingboard.dts b/arch/arm/dts/imx6dl-hummingboard.dts index 2314965260..7f4d2b42f2 100644 --- a/arch/arm/dts/imx6dl-hummingboard.dts +++ b/arch/arm/dts/imx6dl-hummingboard.dts @@ -29,11 +29,11 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; - partition@1 { + partition@e0000 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; }; diff --git a/arch/arm/dts/imx6dl-phytec-phycore-som-nand.dts b/arch/arm/dts/imx6dl-phytec-phycore-som-nand.dts index 2324f3a6e5..3f2f1c7320 100644 --- a/arch/arm/dts/imx6dl-phytec-phycore-som-nand.dts +++ b/arch/arm/dts/imx6dl-phytec-phycore-som-nand.dts @@ -53,11 +53,11 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; - partition@1 { + partition@e0000 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; }; diff --git a/arch/arm/dts/imx6dl-wandboard.dts b/arch/arm/dts/imx6dl-wandboard.dts index a8674004c8..873e9d6985 100644 --- a/arch/arm/dts/imx6dl-wandboard.dts +++ b/arch/arm/dts/imx6dl-wandboard.dts @@ -27,11 +27,11 @@ partition@0 { label = "barebox"; - reg = <0x0 0xc0000>; + reg = <0x0 0xe0000>; }; - environment_usdhc3: partition@c0000 { + environment_usdhc3: partition@e0000 { label = "barebox-environment"; - reg = <0xc0000 0x40000>; + reg = <0xe0000 0x20000>; }; }; diff --git a/arch/arm/dts/imx6q-dmo-edmqmx6.dts b/arch/arm/dts/imx6q-dmo-edmqmx6.dts index 071f5f5c5e..3576211be4 100644 --- a/arch/arm/dts/imx6q-dmo-edmqmx6.dts +++ b/arch/arm/dts/imx6q-dmo-edmqmx6.dts @@ -53,12 +53,12 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; - partition@1 { + partition@e0000 { label = "barebox-environment"; - reg = <0x80000 0x20000>; + reg = <0xe0000 0x20000>; }; }; }; @@ -97,11 +97,11 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; - partition@1 { + partition@e0000 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; }; @@ -111,10 +111,10 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; - partition@1 { + partition@e0000 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; }; diff --git a/arch/arm/dts/imx6q-embedsky-e9.dts b/arch/arm/dts/imx6q-embedsky-e9.dts index 726d620681..3bbb60bba3 100644 --- a/arch/arm/dts/imx6q-embedsky-e9.dts +++ b/arch/arm/dts/imx6q-embedsky-e9.dts @@ -41,11 +41,11 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; - environment_mmc1: partition@1 { + environment_mmc1: partition@e0000 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; }; @@ -55,10 +55,10 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; - environment_mmc3: partition@1 { + environment_mmc3: partition@e0000 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; }; diff --git a/arch/arm/dts/imx6q-guf-santaro.dts b/arch/arm/dts/imx6q-guf-santaro.dts index 27f538a356..2bd1a26317 100644 --- a/arch/arm/dts/imx6q-guf-santaro.dts +++ b/arch/arm/dts/imx6q-guf-santaro.dts @@ -587,9 +587,9 @@ #address-cells = <1>; #size-cells = <1>; - partition@0 { + partition@e0000 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; }; diff --git a/arch/arm/dts/imx6q-hummingboard.dts b/arch/arm/dts/imx6q-hummingboard.dts index e1d2fa8ce2..e707eb91c9 100644 --- a/arch/arm/dts/imx6q-hummingboard.dts +++ b/arch/arm/dts/imx6q-hummingboard.dts @@ -29,11 +29,11 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; - partition@1 { + partition@e0000 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; }; diff --git a/arch/arm/dts/imx6q-phytec-pcaaxl3.dtsi b/arch/arm/dts/imx6q-phytec-pcaaxl3.dtsi index 05224657dc..a6ea7b5cce 100644 --- a/arch/arm/dts/imx6q-phytec-pcaaxl3.dtsi +++ b/arch/arm/dts/imx6q-phytec-pcaaxl3.dtsi @@ -139,22 +139,22 @@ reg = <0x0 0x400000>; }; - environment_nand: partition@1 { + environment_nand: partition@400000 { label = "barebox-environment"; reg = <0x400000 0x20000>; }; - partition@2 { + partition@420000 { label = "oftree"; reg = <0x420000 0x20000>; }; - partition@3 { + partition@440000 { label = "kernel"; reg = <0x440000 0x800000>; }; - partition@4 { + partition@C40000 { label = "root"; reg = <0xC40000 0x0>; }; @@ -181,10 +181,10 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; - environment_usdhc3: partition@1 { + environment_usdhc3: partition@e0000 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; }; diff --git a/arch/arm/dts/imx6q-phytec-phycore-som-nand.dts b/arch/arm/dts/imx6q-phytec-phycore-som-nand.dts index 06f2f71537..aa2c94abee 100644 --- a/arch/arm/dts/imx6q-phytec-phycore-som-nand.dts +++ b/arch/arm/dts/imx6q-phytec-phycore-som-nand.dts @@ -62,11 +62,11 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; - partition@1 { + partition@e0000 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; }; diff --git a/arch/arm/dts/imx6q-var-custom.dts b/arch/arm/dts/imx6q-var-custom.dts index ef6981e3bc..fe03589454 100644 --- a/arch/arm/dts/imx6q-var-custom.dts +++ b/arch/arm/dts/imx6q-var-custom.dts @@ -127,17 +127,17 @@ reg = <0x0 0x200000>; }; - partition@1 { + partition@200000 { label = "barebox-environment"; reg = <0x200000 0x20000>; }; - partition@2 { + partition@220000 { label = "kernel"; reg = <0x220000 0x600000>; }; - partition@3 { + partition@820000 { label = "rootfs"; reg = <0x820000 0x18000000>; }; diff --git a/arch/arm/dts/imx6q-var-som.dtsi b/arch/arm/dts/imx6q-var-som.dtsi index d005f319d6..63a17fc660 100644 --- a/arch/arm/dts/imx6q-var-som.dtsi +++ b/arch/arm/dts/imx6q-var-som.dtsi @@ -42,17 +42,17 @@ reg = <0x0 0x200000>; }; - environment_nand: partition@1 { + environment_nand: partition@200000 { label = "barebox-environment"; reg = <0x200000 0x20000>; }; - partition@2 { + partition@220000 { label = "kernel"; reg = <0x220000 0x600000>; }; - partition@3 { + partition@820000 { label = "rootfs"; reg = <0x820000 0x1F7E0000>; }; diff --git a/arch/arm/dts/imx6q-wandboard.dts b/arch/arm/dts/imx6q-wandboard.dts index 26d8a0077d..0606727a11 100644 --- a/arch/arm/dts/imx6q-wandboard.dts +++ b/arch/arm/dts/imx6q-wandboard.dts @@ -27,11 +27,11 @@ partition@0 { label = "barebox"; - reg = <0x0 0xc0000>; + reg = <0x0 0xe0000>; }; - environment_usdhc3: partition@c0000 { + environment_usdhc3: partition@e0000 { label = "barebox-environment"; - reg = <0xc0000 0x40000>; + reg = <0xe0000 0x20000>; }; }; diff --git a/arch/arm/dts/imx6qdl-gw54xx.dtsi b/arch/arm/dts/imx6qdl-gw54xx.dtsi index ea5739ddcb..5f8e489aeb 100644 --- a/arch/arm/dts/imx6qdl-gw54xx.dtsi +++ b/arch/arm/dts/imx6qdl-gw54xx.dtsi @@ -31,7 +31,7 @@ reg = <0x0 0x400000>; }; - partition@1 { + partition@400000 { label = "barebox-environment"; reg = <0x400000 0x20000>; }; diff --git a/arch/arm/dts/imx6qdl-nitrogen6x.dtsi b/arch/arm/dts/imx6qdl-nitrogen6x.dtsi index 8fcd4e48a4..9ff7395f45 100644 --- a/arch/arm/dts/imx6qdl-nitrogen6x.dtsi +++ b/arch/arm/dts/imx6qdl-nitrogen6x.dtsi @@ -31,12 +31,12 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; - partition@1 { + partition@e0000 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; }; diff --git a/arch/arm/dts/imx6qdl-phytec-pfla02.dtsi b/arch/arm/dts/imx6qdl-phytec-pfla02.dtsi index b79ce2c0f9..26f9746283 100644 --- a/arch/arm/dts/imx6qdl-phytec-pfla02.dtsi +++ b/arch/arm/dts/imx6qdl-phytec-pfla02.dtsi @@ -66,17 +66,17 @@ reg = <0x0 0x100000>; }; - partition@1 { + partition@100000 { label = "barebox-environment"; reg = <0x100000 0x20000>; }; - partition@2 { + partition@120000 { label = "oftree"; reg = <0x120000 0x20000>; }; - partition@3 { + partition@140000 { label = "kernel"; reg = <0x140000 0x0>; }; @@ -108,22 +108,22 @@ reg = <0x0 0x400000>; }; - partition@1 { + partition@400000 { label = "barebox-environment"; reg = <0x400000 0x100000>; }; - partition@2 { + partition@500000 { label = "oftree"; reg = <0x500000 0x100000>; }; - partition@3 { + partition@600000 { label = "kernel"; reg = <0x600000 0x800000>; }; - partition@4 { + partition@e00000 { label = "root"; reg = <0xe00000 0x0>; }; @@ -180,11 +180,11 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; - partition@1 { + partition@e0000 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; }; diff --git a/arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi b/arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi index 2a975d103e..139150e207 100644 --- a/arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi +++ b/arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi @@ -55,17 +55,17 @@ reg = <0x0 0x100000>; }; - partition@1 { + partition@100000 { label = "barebox-environment"; reg = <0x100000 0x20000>; }; - partition@2 { + partition@120000 { label = "oftree"; reg = <0x120000 0x20000>; }; - partition@3 { + partition@140000 { label = "kernel"; reg = <0x140000 0x0>; }; @@ -91,22 +91,22 @@ reg = <0x0 0x400000>; }; - partition@1 { + partition@400000 { label = "barebox-environment"; reg = <0x400000 0x100000>; }; - partition@2 { + partition@500000 { label = "oftree"; reg = <0x500000 0x100000>; }; - partition@3 { + partition@600000 { label = "kernel"; reg = <0x600000 0x800000>; }; - partition@4 { + partition@e00000 { label = "root"; reg = <0xe00000 0x0>; }; @@ -256,11 +256,11 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; - partition@1 { + partition@e0000 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; }; diff --git a/arch/arm/dts/imx6qdl-sabrelite.dtsi b/arch/arm/dts/imx6qdl-sabrelite.dtsi index d5a6ff4b1f..10b0002ec2 100644 --- a/arch/arm/dts/imx6qdl-sabrelite.dtsi +++ b/arch/arm/dts/imx6qdl-sabrelite.dtsi @@ -31,12 +31,12 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; - partition@1 { + partition@e0000 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; }; diff --git a/arch/arm/dts/imx6qdl-sabresd.dtsi b/arch/arm/dts/imx6qdl-sabresd.dtsi index 32318cf389..6b10229c88 100644 --- a/arch/arm/dts/imx6qdl-sabresd.dtsi +++ b/arch/arm/dts/imx6qdl-sabresd.dtsi @@ -31,11 +31,11 @@ partition@0 { label = "barebox"; - reg = <0x0 0x80000>; + reg = <0x0 0xe0000>; }; - environment_usdhc3: partition@1 { + environment_usdhc3: partition@e0000 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; }; diff --git a/arch/arm/dts/imx6qdl-tx6x.dtsi b/arch/arm/dts/imx6qdl-tx6x.dtsi index 9c5d676a74..3898425d9c 100644 --- a/arch/arm/dts/imx6qdl-tx6x.dtsi +++ b/arch/arm/dts/imx6qdl-tx6x.dtsi @@ -32,7 +32,7 @@ reg = <0x0 0x400000>; }; - partition@1 { + partition@400000 { label = "barebox-environment"; reg = <0x400000 0x100000>; }; diff --git a/arch/arm/dts/imx6s-riotboard.dts b/arch/arm/dts/imx6s-riotboard.dts index 3d0a930c3f..09ac534625 100644 --- a/arch/arm/dts/imx6s-riotboard.dts +++ b/arch/arm/dts/imx6s-riotboard.dts @@ -233,9 +233,9 @@ reg = <0x0 0x80000>; }; - environment_usdhc4: partition@1 { + environment_usdhc4: partition@e0000 { label = "barebox-environment"; - reg = <0x80000 0x80000>; + reg = <0xe0000 0x20000>; }; }; diff --git a/arch/arm/dts/imx6sx-sdb.dts b/arch/arm/dts/imx6sx-sdb.dts index fbf098bbe6..7b60f9326a 100644 --- a/arch/arm/dts/imx6sx-sdb.dts +++ b/arch/arm/dts/imx6sx-sdb.dts @@ -52,9 +52,9 @@ #address-cells = <1>; #size-cells = <1>; - partition@0 { + partition@e0000 { label = "barebox-environment"; - reg = <0x80000 0x20000>; + reg = <0xe0000 0x20000>; }; }; diff --git a/arch/arm/dts/rk3188-radxarock.dts b/arch/arm/dts/rk3188-radxarock.dts index 47b2487dd9..cafd4d36ed 100644 --- a/arch/arm/dts/rk3188-radxarock.dts +++ b/arch/arm/dts/rk3188-radxarock.dts @@ -34,7 +34,7 @@ label = "barebox"; reg = <0x0 0x80000>; }; - partition@1 { + partition@80000 { label = "barebox-environment"; reg = <0x80000 0x80000>; }; diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 28b4f4a4b4..f6024c80ec 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -67,21 +67,30 @@ static int sdram_start_and_size(unsigned long *start, unsigned long *size) return 0; } -static void get_kernel_addresses(unsigned long mem_start, size_t image_size, +static int get_kernel_addresses(size_t image_size, int verbose, unsigned long *load_address, - unsigned long *spacing) + unsigned long *mem_free) { + unsigned long mem_start, mem_size; + int ret; + size_t image_decomp_size; + unsigned long spacing; + + ret = sdram_start_and_size(&mem_start, &mem_size); + if (ret) + return ret; + /* * We don't know the exact decompressed size so just use a conservative * default of 4 times the size of the compressed image. */ - size_t image_decomp_size = PAGE_ALIGN(image_size * 4); + image_decomp_size = PAGE_ALIGN(image_size * 4); /* * By default put oftree/initrd close behind compressed kernel image to * avoid placing it outside of the kernels lowmem region. */ - *spacing = SZ_1M; + spacing = SZ_1M; if (*load_address == UIMAGE_INVALID_ADDRESS) { /* @@ -99,8 +108,12 @@ static void get_kernel_addresses(unsigned long mem_start, size_t image_size, * spacing to allow this relocation to happen without * overwriting anything placed behind the kernel. */ - *spacing += image_decomp_size; + spacing += image_decomp_size; } + + *mem_free = PAGE_ALIGN(*load_address + image_size + spacing); + + return 0; } static int __do_bootm_linux(struct image_data *data, unsigned long free_mem, int swap) @@ -160,24 +173,20 @@ static int __do_bootm_linux(struct image_data *data, unsigned long free_mem, int static int do_bootm_linux(struct image_data *data) { - unsigned long load_address, mem_start, mem_size, mem_free, spacing; + unsigned long load_address, mem_free; int ret; - ret = sdram_start_and_size(&mem_start, &mem_size); - if (ret) - return ret; - load_address = data->os_address; - get_kernel_addresses(mem_start, bootm_get_os_size(data), - bootm_verbose(data), &load_address, &spacing); + ret = get_kernel_addresses(bootm_get_os_size(data), + bootm_verbose(data), &load_address, &mem_free); + if (ret) + return ret; ret = bootm_load_os(data, load_address); if (ret) return ret; - mem_free = PAGE_ALIGN(data->os_res->end + spacing); - return __do_bootm_linux(data, mem_free, 0); } @@ -273,11 +282,7 @@ static int do_bootz_linux(struct image_data *data) u32 end, start; size_t image_size; unsigned long load_address = data->os_address; - unsigned long mem_start, mem_size, mem_free, spacing; - - ret = sdram_start_and_size(&mem_start, &mem_size); - if (ret) - return ret; + unsigned long mem_free; fd = open(data->os_file, O_RDONLY); if (fd < 0) { @@ -315,8 +320,10 @@ static int do_bootz_linux(struct image_data *data) image_size = end - start; load_address = data->os_address; - get_kernel_addresses(mem_start, image_size, bootm_verbose(data), - &load_address, &spacing); + ret = get_kernel_addresses(image_size, bootm_verbose(data), + &load_address, &mem_free); + if (ret) + return ret; data->os_res = request_sdram_region("zimage", load_address, image_size); if (!data->os_res) { @@ -352,8 +359,6 @@ static int do_bootz_linux(struct image_data *data) close(fd); - mem_free = PAGE_ALIGN(data->os_res->end + spacing); - return __do_bootm_linux(data, mem_free, swap); err_out: @@ -570,7 +575,7 @@ static int armlinux_register_image_handler(void) register_image_handler(&aimage_handler); binfmt_register(&binfmt_aimage_hook); } - if (IS_BUILTIN(CONFIG_CMD_BOOTM_FITIMAGE)) + if (IS_BUILTIN(CONFIG_FITIMAGE)) register_image_handler(&arm_fit_handler); binfmt_register(&binfmt_arm_zimage_hook); binfmt_register(&binfmt_barebox_hook); diff --git a/commands/Kconfig b/commands/Kconfig index 875c5f4f01..13dd9bb9b3 100644 --- a/commands/Kconfig +++ b/commands/Kconfig @@ -266,19 +266,6 @@ endmenu menu "Boot" -# TODO: isn't a command -config FLEXIBLE_BOOTARGS - bool - prompt "flexible Linux bootargs generation" - depends on CMD_GLOBAL - help - Select this to get a more flexible bootargs generation. With this - option the bootargs are concatenated together from global variables - beginning with 'global.linux.bootargs.' and 'global.linux.mtdparts.' - This allows for more flexible scripting since with it it's possible - to replace parts of the bootargs string without reconstructing it - completely. - config CMD_AT91_BOOT_TEST bool "at91_boot_test" depends on ARCH_AT91 diff --git a/common/Kconfig b/common/Kconfig index 7c09e8c117..d00ca6b0fb 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -536,6 +536,18 @@ config BLSPEC on a device and it allows the Operating System to install / update kernels. +config FLEXIBLE_BOOTARGS + bool + prompt "flexible Linux bootargs generation" + depends on GLOBALVAR + help + Select this to get a more flexible bootargs generation. With this + option the bootargs are concatenated together from global variables + beginning with 'global.linux.bootargs.' and 'global.linux.mtdparts.' + This allows for more flexible scripting since with it it's possible + to replace parts of the bootargs string without reconstructing it + completely. + config IMD bool "barebox metadata support" diff --git a/drivers/serial/serial_auart.c b/drivers/serial/serial_auart.c index 9bef576cd7..c3b9a1995f 100644 --- a/drivers/serial/serial_auart.c +++ b/drivers/serial/serial_auart.c @@ -230,9 +230,18 @@ static void auart_serial_remove(struct device_d *dev) free(priv); } +static const __maybe_unused struct of_device_id auart_serial_dt_ids[] = { + { + .compatible = "fsl,imx23-auart", + }, { + /* sentinel */ + } +}; + static struct driver_d auart_serial_driver = { .name = "auart_serial", .probe = auart_serial_probe, .remove = auart_serial_remove, + .of_compatible = DRV_OF_COMPAT(auart_serial_dt_ids), }; console_platform_driver(auart_serial_driver); diff --git a/images/Makefile.am33xx b/images/Makefile.am33xx index 6c7e81a9dc..8be78eff89 100644 --- a/images/Makefile.am33xx +++ b/images/Makefile.am33xx @@ -83,6 +83,12 @@ FILE_barebox-am33xx-phytec-phycore-mlo-1024mb.spi.img = start_am33xx_phytec_phyc am33xx-mlo-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phycore-mlo-1024mb.img am33xx-mlospi-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phycore-mlo-1024mb.spi.img +pblx-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phycore_r2_sram_1024mb +FILE_barebox-am33xx-phytec-phycore-r2-mlo-1024mb.img = start_am33xx_phytec_phycore_r2_sram_1024mb.pblx.mlo +FILE_barebox-am33xx-phytec-phycore-r2-mlo-1024mb.spi.img = start_am33xx_phytec_phycore_r2_sram_1024mb.pblx.mlospi +am33xx-mlo-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phycore-r2-mlo-1024mb.img +am33xx-mlospi-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phycore-r2-mlo-1024mb.spi.img + pblx-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phyflex_sdram FILE_barebox-am33xx-phytec-phyflex.img = start_am33xx_phytec_phyflex_sdram.pblx am33xx-barebox-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phyflex.img diff --git a/images/Makefile.socfpga b/images/Makefile.socfpga index d52b909ff3..7e642c06c9 100644 --- a/images/Makefile.socfpga +++ b/images/Makefile.socfpga @@ -2,7 +2,7 @@ # barebox image generation Makefile for Altera socfpga # -# %.socfpga - convert into socfpga image +# %.socfpgaimg - convert into socfpga image # ---------------------------------------------------------------- quiet_cmd_socfpga_image = SOCFPGA-IMG $@ cmd_socfpga_image = scripts/socfpga_mkimage -b -o $@ $< |