Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 130912
b: refs/heads/master
c: b52dae3
h: refs/heads/master
v: v3
  • Loading branch information
Sonic Zhang authored and Bryan Wu committed Feb 4, 2009
1 parent 4def6de commit f0bba7b
Show file tree
Hide file tree
Showing 17 changed files with 20 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5b93e13ffa8b06ff80eaa8e0ae92e44ebf61cde9
refs/heads/master: b52dae3139066765a7d96563e9cd33d9e60efe33
2 changes: 1 addition & 1 deletion trunk/arch/blackfin/include/asm/reboot.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 2 additions & 3 deletions trunk/arch/blackfin/kernel/bfin_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/blackfin/mach-bf518/boards/ezbrd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/blackfin/mach-bf518/include/mach/portmux.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/blackfin/mach-bf527/boards/cm_bf527.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/blackfin/mach-bf527/boards/ezbrd.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,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)
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/blackfin/mach-bf527/boards/ezkit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,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)
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/blackfin/mach-bf527/include/mach/portmux.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@

#define P_HWAIT (P_DONTCARE)

#define P_DEFAULT_BOOT_SPI_CS P_SPI0_SSEL1

#define P_SPI0_SS (P_DEFINED | P_IDENT(GPIO_PG1) | P_FUNCT(0))
#define P_SPI0_SSEL1 (P_DEFINED | P_IDENT(GPIO_PG1) | P_FUNCT(2))
#define P_SPI0_SCK (P_DEFINED | P_IDENT(GPIO_PG2) | P_FUNCT(2))
Expand Down
5 changes: 1 addition & 4 deletions trunk/arch/blackfin/mach-bf533/include/mach/portmux.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,11 @@
#define P_SPI0_SSEL2 (P_DEFINED | P_IDENT(GPIO_PF2))
#define P_SPI0_SSEL1 (P_DEFINED | P_IDENT(GPIO_PF1))
#define P_SPI0_SS (P_DEFINED | P_IDENT(GPIO_PF0))
#define P_DEFAULT_BOOT_SPI_CS P_SPI0_SSEL2

#define P_TMR2 (P_DONTCARE)
#define P_TMR1 (P_DONTCARE)
#define P_TMR0 (P_DONTCARE)
#define P_TMRCLK (P_DEFINED | P_IDENT(GPIO_PF1))





#endif /* _MACH_PORTMUX_H_ */
2 changes: 1 addition & 1 deletion trunk/arch/blackfin/mach-bf537/boards/generic_board.c
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,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);
}

#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/blackfin/mach-bf537/boards/minotaur.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,5 +377,5 @@ 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);
}
2 changes: 1 addition & 1 deletion trunk/arch/blackfin/mach-bf537/boards/stamp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,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);
}

/*
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/blackfin/mach-bf537/include/mach/portmux.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#define P_PPI0_FS1 (P_DEFINED | P_IDENT(GPIO_PF9) | P_FUNCT(1))
#define P_TACLK0 (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(1))
#define P_TMRCLK (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(1))
#define P_DEFAULT_BOOT_SPI_CS P_SPI0_SSEL1

#define P_PPI0_D0 (P_DEFINED | P_IDENT(GPIO_PG0) | P_FUNCT(0))
#define P_PPI0_D1 (P_DEFINED | P_IDENT(GPIO_PG1) | P_FUNCT(0))
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/blackfin/mach-bf538/include/mach/portmux.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,6 @@
#define P_SPI0_SSEL2 (P_DEFINED | P_IDENT(GPIO_PF2))
#define P_SPI0_SSEL1 (P_DEFINED | P_IDENT(GPIO_PF1))
#define P_SPI0_SS (P_DEFINED | P_IDENT(GPIO_PF0))
#define P_DEFAULT_BOOT_SPI_CS P_SPI0_SSEL2

#endif /* _MACH_PORTMUX_H_ */
1 change: 1 addition & 0 deletions trunk/arch/blackfin/mach-bf548/include/mach/portmux.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
#define P_KEY_COL2 (P_DEFINED | P_IDENT(GPIO_PD14) | P_FUNCT(3))
#define P_KEY_COL3 (P_DEFINED | P_IDENT(GPIO_PD15) | P_FUNCT(3))

#define P_DEFAULT_BOOT_SPI_CS P_SPI0_SSEL1
#define P_SPI0_SCK (P_DEFINED | P_IDENT(GPIO_PE0) | P_FUNCT(0))
#define P_SPI0_MISO (P_DEFINED | P_IDENT(GPIO_PE1) | P_FUNCT(0))
#define P_SPI0_MOSI (P_DEFINED | P_IDENT(GPIO_PE2) | P_FUNCT(0))
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/blackfin/mach-bf561/include/mach/portmux.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,6 @@
#define P_SPI0_MOSI (P_DONTCARE)
#define P_SPI0_MISO (P_DONTCARE)
#define P_SPI0_SCK (P_DONTCARE)
#define P_DEFAULT_BOOT_SPI_CS P_SPI0_SSEL2

#endif /* _MACH_PORTMUX_H_ */

0 comments on commit f0bba7b

Please sign in to comment.