u-boot-brain/arch/arm
Alexander Dahl 7dee1848d7 ARM: at91: sama5d2: Wrap cpu detection to fix macb driver
When introducing the SAMA5D27 SoCs, the SAMA5D2 series got an additional
chip id. The check if the cpu is sama5d2 was changed from a preprocessor
definition (inlining a call to 'get_chip_id()') to a C function,
probably to not call get_chip_id twice?

That however broke a check in the macb ethernet driver. That driver is
more generic and also used for other platforms. I suppose this solution
was implemented to use it in 'gem_is_gigabit_capable()', without having
to stricly depend on the at91 platform:

	#ifndef cpu_is_sama5d2
	#define cpu_is_sama5d2() 0
	#endif

That only works as long as cpu_is_sama5d2 is a preprocessor definition.
(The same is still true for sama5d4 by the way.) So this is a straight
forward fix for the workaround.

The not working check on the SAMA5D2 CPU lead to an issue on a custom
board with a LAN8720A ethernet phy connected to the SoC:

	=> dhcp
	ethernet@f8008000: PHY present at 1
	ethernet@f8008000: Starting autonegotiation...
	ethernet@f8008000: Autonegotiation complete
	ethernet@f8008000: link up, 1000Mbps full-duplex (lpa: 0xffff)
	BOOTP broadcast 1
	BOOTP broadcast 2
	BOOTP broadcast 3
	BOOTP broadcast 4
	BOOTP broadcast 5
	BOOTP broadcast 6
	BOOTP broadcast 7
	BOOTP broadcast 8
	BOOTP broadcast 9
	BOOTP broadcast 10
	BOOTP broadcast 11
	BOOTP broadcast 12
	BOOTP broadcast 13
	BOOTP broadcast 14
	BOOTP broadcast 15
	BOOTP broadcast 16
	BOOTP broadcast 17

	Retry time exceeded; starting again

Notice the wrong reported link speed, although both SoC and phy only
support 100 MBit/s!

The real issue on reliably detecting the features of that cadence
ethernet mac IP block, is probably more complicated, though.

Fixes: 245cbc583d ("ARM: at91: Get the Chip ID of SAMA5D2 SiP")
Signed-off-by: Alexander Dahl <ada@thorsis.com>
2019-04-09 09:28:50 +03:00
..
cpu armv8: Disable exception vectors in SPL by default 2019-03-22 12:15:03 -04:00
dts dts: imx8qxp-mek: Add PHY post reset delay 2019-04-08 15:24:39 +02:00
include armv7: ls102xa: Add workaround for DDR erratum A-008850 2019-03-15 11:52:01 +05:30
lib arm: lib: bootm: Push the Starting kernel print to the end 2019-03-22 08:35:50 -04:00
mach-aspeed regmap: change regmap_init_mem() to take ofnode instead udevice 2018-05-07 15:49:51 -04:00
mach-at91 ARM: at91: sama5d2: Wrap cpu detection to fix macb driver 2019-04-09 09:28:50 +03:00
mach-bcm283x arm: Kconfig: spelling fixes 2019-01-18 09:16:15 -05:00
mach-bcmstb board: arm: Add support for Broadcom BCM7260 2018-09-10 21:19:31 -04:00
mach-davinci driver: net: consolidate ti's code in separate folder 2018-11-05 10:41:59 -06:00
mach-exynos exynos: replace CONFIG_ENV_SPI_BASE by CONFIG_SYS_SPI_BASE 2019-03-25 17:35:52 -04:00
mach-highbank SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mach-imx imx8qxp: Fix the reported CPU frequency 2019-03-13 09:14:35 +01:00
mach-integrator
mach-k3 arm: mach-k3: common: Clean up ATF image startup function 2019-02-09 07:51:02 -05:00
mach-keystone ti: remove usage of DM_I2C_COMPAT and don't disable DM_I2C in SPL 2018-12-10 07:15:21 +01:00
mach-kirkwood Convert CONFIG_ENV_SPI_* to Kconfig 2019-03-25 17:36:59 -04:00
mach-mediatek mt7629: use linux kernel compatible SMP initialization 2018-12-26 21:35:53 -05:00
mach-meson arm: meson: board-gx: Setup VPU in fdt 2019-01-31 09:35:01 +01:00
mach-mvebu Convert CONFIG_ENV_SPI_* to Kconfig 2019-03-25 17:36:59 -04:00
mach-omap2 usb: Rename SPL_USB_SUPPORT to SPL_USB_STORAGE 2019-02-15 22:01:15 +01:00
mach-orion5x arm: remove prototype for get_timer_masked 2018-10-10 13:35:09 -04:00
mach-owl board: Add uCRobotics Bubblegum-96 board support 2018-07-09 15:25:23 -04:00
mach-qemu Kconfig: Sort bool, default, select and imply options 2018-07-30 07:18:48 -04:00
mach-rmobile ARM: rmobile: Imply SoC per board 2019-02-25 16:07:41 +01:00
mach-rockchip Revert "rockchip: Drop call to rockchip_dnl_mode_check() for now" 2019-03-29 09:21:13 +01:00
mach-s5pc1xx exynos: Convert to use CONFIG_BLK 2019-02-09 12:50:21 -07:00
mach-snapdragon arm: mach-snapdragon: pinctrl: clarify gpio disable bit 2019-01-25 12:12:56 -05:00
mach-socfpga ARM: socfpga: Disable D cache in SPL 2019-03-09 17:59:13 +01:00
mach-sti
mach-stm32 mach-stm32: Set MPU SDRAM size to 512MB for STM32F7/H7 2018-10-06 14:09:41 -04:00
mach-stm32mp arm: stm32mp1: deploy spl in root folder 2019-01-29 09:41:37 -05:00
mach-sunxi arm: sunxi: Enable DM_MMC on required SoCs 2019-04-08 16:35:15 -04:00
mach-tegra arm64: zynqmp: Move SoC sources to mach-zynqmp 2019-01-24 10:03:44 +01:00
mach-uniphier ARM: uniphier: do not modify bootcmd environment variable at run-time 2018-12-29 11:38:33 +09:00
mach-versal arm64: versal: Move IOU_SWITCH_DIVISOR0 to Kconfig 2019-02-14 14:31:10 +01:00
mach-versatile SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mach-zynq ARM: zynq: Remove addresses for i2c controllers 2019-02-14 14:31:10 +01:00
mach-zynqmp arm64: zynqmp: Fix logic around CONFIG_ZYNQ_SDHCI 2019-02-14 14:31:10 +01:00
mach-zynqmp-r5 arm: zynqmp: Add ZynqMP minimal R5 support 2018-05-11 09:38:23 +02:00
thumb1/include/asm/proc-armv SPDX: Convert a few files that were missed before 2018-05-10 20:38:35 -04:00
config.mk efi_loader: Rename sections to allow for implicit data 2018-07-25 14:57:44 +02:00
Kconfig arm: sunxi: Enable DM_MMC on required SoCs 2019-04-08 16:35:15 -04:00
Kconfig.debug
Makefile arm: imx: build mach-imx for i.MX8 2019-01-28 20:35:47 +01:00