-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge git://git.denx.de/u-boot-marvell
- Loading branch information
Showing
36 changed files
with
379 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# | ||
# Copyright (C) 2014-2015 Stefan Roese <[email protected]> | ||
# | ||
# SPDX-License-Identifier: GPL-2.0+ | ||
# | ||
|
||
ifdef CONFIG_KIRKWOOD | ||
|
||
obj-y = dram.o | ||
obj-y += gpio.o | ||
obj-y += timer.o | ||
|
||
else | ||
|
||
obj-y = cpu.o | ||
obj-y += dram.o | ||
obj-y += gpio.o | ||
obj-y += mbus.o | ||
obj-y += timer.o | ||
obj-$(CONFIG_SPL_BUILD) += spl.o | ||
obj-$(CONFIG_SPL_BUILD) += lowlevel_spl.o | ||
|
||
obj-y += serdes/ | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (C) 2014 Stefan Roese <[email protected]> | ||
* Copyright (C) 2014-2015 Stefan Roese <[email protected]> | ||
* | ||
* SPDX-License-Identifier: GPL-2.0+ | ||
*/ | ||
|
@@ -40,6 +40,20 @@ void reset_cpu(unsigned long ignored) | |
; | ||
} | ||
|
||
int mvebu_soc_family(void) | ||
{ | ||
u16 devid = (readl(MVEBU_REG_PCIE_DEVID) >> 16) & 0xffff; | ||
|
||
if (devid == SOC_MV78460_ID) | ||
return MVEBU_SOC_AXP; | ||
|
||
if (devid == SOC_88F6810_ID || devid == SOC_88F6820_ID || | ||
devid == SOC_88F6828_ID) | ||
return MVEBU_SOC_A38X; | ||
|
||
return MVEBU_SOC_UNKNOWN; | ||
} | ||
|
||
#if defined(CONFIG_DISPLAY_CPUINFO) | ||
int print_cpuinfo(void) | ||
{ | ||
|
@@ -52,23 +66,48 @@ int print_cpuinfo(void) | |
case SOC_MV78460_ID: | ||
puts("MV78460-"); | ||
break; | ||
default: | ||
puts("Unknown-"); | ||
case SOC_88F6810_ID: | ||
puts("MV88F6810-"); | ||
break; | ||
} | ||
|
||
switch (revid) { | ||
case 1: | ||
puts("A0\n"); | ||
case SOC_88F6820_ID: | ||
puts("MV88F6820-"); | ||
break; | ||
case 2: | ||
puts("B0\n"); | ||
case SOC_88F6828_ID: | ||
puts("MV88F6828-"); | ||
break; | ||
default: | ||
puts("??\n"); | ||
puts("Unknown-"); | ||
break; | ||
} | ||
|
||
if (mvebu_soc_family() == MVEBU_SOC_AXP) { | ||
switch (revid) { | ||
case 1: | ||
puts("A0\n"); | ||
break; | ||
case 2: | ||
puts("B0\n"); | ||
break; | ||
default: | ||
printf("?? (%x)\n", revid); | ||
break; | ||
} | ||
} | ||
|
||
if (mvebu_soc_family() == MVEBU_SOC_A38X) { | ||
switch (revid) { | ||
case MV_88F68XX_Z1_ID: | ||
puts("Z1\n"); | ||
break; | ||
case MV_88F68XX_A0_ID: | ||
puts("A0\n"); | ||
break; | ||
default: | ||
printf("?? (%x)\n", revid); | ||
break; | ||
} | ||
} | ||
|
||
return 0; | ||
} | ||
#endif /* CONFIG_DISPLAY_CPUINFO */ | ||
|
@@ -145,11 +184,13 @@ int arch_cpu_init(void) | |
*/ | ||
mvebu_mbus_probe(NULL, 0); | ||
|
||
/* | ||
* Now the SDRAM access windows can be reconfigured using | ||
* the information in the SDRAM scratch pad registers | ||
*/ | ||
update_sdram_window_sizes(); | ||
if (mvebu_soc_family() == MVEBU_SOC_AXP) { | ||
/* | ||
* Now the SDRAM access windows can be reconfigured using | ||
* the information in the SDRAM scratch pad registers | ||
*/ | ||
update_sdram_window_sizes(); | ||
} | ||
|
||
/* | ||
* Finally the mbus windows can be configured with the | ||
|
@@ -175,10 +216,22 @@ int arch_misc_init(void) | |
#ifdef CONFIG_MVNETA | ||
int cpu_eth_init(bd_t *bis) | ||
{ | ||
mvneta_initialize(bis, MVEBU_EGIGA0_BASE, 0, CONFIG_PHY_BASE_ADDR + 0); | ||
mvneta_initialize(bis, MVEBU_EGIGA1_BASE, 1, CONFIG_PHY_BASE_ADDR + 1); | ||
mvneta_initialize(bis, MVEBU_EGIGA2_BASE, 2, CONFIG_PHY_BASE_ADDR + 2); | ||
mvneta_initialize(bis, MVEBU_EGIGA3_BASE, 3, CONFIG_PHY_BASE_ADDR + 3); | ||
u32 enet_base[] = { MVEBU_EGIGA0_BASE, MVEBU_EGIGA1_BASE, | ||
MVEBU_EGIGA2_BASE, MVEBU_EGIGA3_BASE }; | ||
u8 phy_addr[] = CONFIG_PHY_ADDR; | ||
int i; | ||
|
||
/* | ||
* Only Armada XP supports all 4 ethernet interfaces. A38x has | ||
* slightly different base addresses for its 2-3 interfaces. | ||
*/ | ||
if (mvebu_soc_family() != MVEBU_SOC_AXP) { | ||
enet_base[1] = MVEBU_EGIGA2_BASE; | ||
enet_base[2] = MVEBU_EGIGA3_BASE; | ||
} | ||
|
||
for (i = 0; i < ARRAY_SIZE(phy_addr); i++) | ||
mvneta_initialize(bis, enet_base[i], i, phy_addr[i]); | ||
|
||
return 0; | ||
} | ||
|
@@ -187,6 +240,9 @@ int cpu_eth_init(bd_t *bis) | |
#ifndef CONFIG_SYS_DCACHE_OFF | ||
void enable_caches(void) | ||
{ | ||
/* Avoid problem with e.g. neta ethernet driver */ | ||
invalidate_dcache_all(); | ||
|
||
/* Enable D-cache. I-cache is already enabled in start.S */ | ||
dcache_enable(); | ||
} | ||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
if TARGET_DB_88F6820_GP | ||
|
||
config SYS_BOARD | ||
default "db-88f6820-gp" | ||
|
||
config SYS_VENDOR | ||
default "Marvell" | ||
|
||
config SYS_SOC | ||
default "mvebu" | ||
|
||
config SYS_CONFIG_NAME | ||
default "db-88f6820-gp" | ||
|
||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# | ||
# Copyright (C) 2015 Stefan Roese <[email protected]> | ||
# | ||
# SPDX-License-Identifier: GPL-2.0+ | ||
# | ||
|
||
obj-y := db-88f6820-gp.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
-------- | ||
WARNING: | ||
-------- | ||
This file should contain the bin_hdr generated by the original Marvell | ||
U-Boot implementation. As this is currently not included in this | ||
U-Boot version, we have added this placeholder, so that the U-Boot | ||
image can be generated without errors. | ||
|
||
If you have a known to be working bin_hdr for your board, then you | ||
just need to replace this text file here with the binary header | ||
and recompile U-Boot. | ||
|
||
In a few weeks, mainline U-Boot will get support to generate the | ||
bin_hdr with the DDR training code itself. By implementing this code | ||
as SPL U-Boot. Then this file will not be needed any more and will | ||
get removed. |
Oops, something went wrong.