Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b52dae31 authored by Sonic Zhang's avatar Sonic Zhang Committed by Bryan Wu
Browse files

Blackfin arch: Fix bug - Run "reboot" hangs bf518-ezbrd



[Mike Frysinger <vapier.adi@gmail.com>:
 - setup P_DEFAULT_BOOT_SPI_CS  for every arch based on
   the default bootrom behavior and convert all our boards
   to it
 - revert previous anomaly change ... bf51x is not affected
   by anomaly 05000353]

Signed-off-by: default avatarSonic Zhang <sonic.zhang@analog.com>
Signed-off-by: default avatarMike Frysinger <vapier.adi@gmail.com>
Signed-off-by: default avatarBryan Wu <cooloney@kernel.org>
parent 5b93e13f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -15,6 +15,6 @@ extern void native_machine_halt(void);
extern void native_machine_power_off(void);

/* common reboot workarounds */
extern void bfin_gpio_reset_spi0_ssel1(void);
extern void bfin_reset_boot_spi_cs(unsigned short pin);

#endif
+2 −3
Original line number Diff line number Diff line
@@ -1172,10 +1172,9 @@ EXPORT_SYMBOL(bfin_gpio_get_value);
 * lives here as we need to force all the GPIO states w/out going through
 * BUG() checks and such.
 */
void bfin_gpio_reset_spi0_ssel1(void)
void bfin_reset_boot_spi_cs(unsigned short pin)
{
	u16 gpio = P_IDENT(P_SPI0_SSEL1);

	unsigned short gpio = P_IDENT(pin);
	port_setup(gpio, GPIO_USAGE);
	gpio_array[gpio_bank(gpio)]->data_set = gpio_bit(gpio);
	AWA_DUMMY_READ(data_set);
+1 −1
Original line number Diff line number Diff line
@@ -649,7 +649,7 @@ void native_machine_restart(char *cmd)
{
	/* workaround reboot hang when booting from SPI */
	if ((bfin_read_SYSCR() & 0x7) == 0x3)
		bfin_gpio_reset_spi0_ssel1();
		bfin_reset_boot_spi_cs(P_DEFAULT_BOOT_SPI_CS);
}

void bfin_get_ether_addr(char *addr)
+2 −0
Original line number Diff line number Diff line
@@ -103,6 +103,8 @@
#define P_SPI1_SSEL4	(P_DEFINED | P_IDENT(GPIO_PF8) | P_FUNCT(2))
#define P_SPI1_SSEL5	(P_DEFINED | P_IDENT(GPIO_PG11) | P_FUNCT(2))

#define P_DEFAULT_BOOT_SPI_CS P_SPI0_SSEL2

/* SPORT Port Mux */
#define P_SPORT0_DRPRI	(P_DEFINED | P_IDENT(GPIO_PG3) | P_FUNCT(0))
#define P_SPORT0_RSCLK	(P_DEFINED | P_IDENT(GPIO_PG4) | P_FUNCT(0))
+1 −1
Original line number Diff line number Diff line
@@ -988,7 +988,7 @@ void native_machine_restart(char *cmd)
{
	/* workaround reboot hang when booting from SPI */
	if ((bfin_read_SYSCR() & 0x7) == 0x3)
		bfin_gpio_reset_spi0_ssel1();
		bfin_reset_boot_spi_cs(P_DEFAULT_BOOT_SPI_CS);
}

void bfin_get_ether_addr(char *addr)
Loading