.On Tue, Jan 13, 2009 at 06:12, Mike Frysinger wrote: > On Tue, Jan 13, 2009 at 00:35, <[email protected]> wrote: >> +void bfin_gpio_reset_spi0(unsigned int ssel) >> { >> + u16 gpio; >> >> + switch (ssel) { >> + case 1: >> + gpio = P_IDENT(P_SPI0_SSEL1); >> + break; >> + case 2: >> + gpio = P_IDENT(P_SPI0_SSEL2); >> + break; >> ... >> - bfin_gpio_reset_spi0_ssel1(); >> + bfin_gpio_reset_spi0(2); > > wouldnt it make more sense to pass in P_SPI0_SSEL2 ? the resulting > code would be a lot cleaner and i think smaller.
actually, now that i remember, even this doesnt make sense. the point of the function was two fold: - reset the spi cs that is the booting source - make it so the board doesnt have to know what cs the bootrom uses however, newer parts have OTP and you can change the cs that is used for booting. so we should change our headers to define like P_DEFAULT_BFROM_SPI_CS and have all our boards use that. -mike _______________________________________________ Linux-kernel-commits mailing list [email protected] http://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits
