> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > On Behalf Of Tabi Timur-B04825 > Sent: Friday, August 31, 2007 5:07 AM > To: Anton Vorontsov > Cc: linuxppc-dev@ozlabs.org > Subject: Re: [PATCH v7 3/3] [POWERPC] MPC832x_RDB: update dts > to use SPI1in QE, register mmc_spi stub > > Anton Vorontsov wrote: > > > +static int __init mpc832x_spi_init(void) { > > + if (!machine_is(mpc832x_rdb)) > > + return 0; > > + > > + par_io_config_pin(3, 0, 3, 0, 1, 0); /* SPI1 MOSI, I/O */ > > + par_io_config_pin(3, 1, 3, 0, 1, 0); /* SPI1 MISO, I/O */ > > + par_io_config_pin(3, 2, 3, 0, 1, 0); /* SPI1 CLK, I/O */ > > + par_io_config_pin(3, 3, 2, 0, 1, 0); /* SPI1 SEL, I */ > > + > > + par_io_config_pin(3, 13, 1, 0, 0, 0); /* !SD_CS, O */ > > + par_io_config_pin(3, 14, 2, 0, 0, 0); /* SD_INSERT, I */ > > + par_io_config_pin(3, 15, 2, 0, 0, 0); /* SD_PROTECT,I */ > > Why are you doing this here, and not in the device tree?
I saw you used pio node, but later changed to make it hardcoded. What's the reason? IMO, device tree is used to describe the hardware settings, pio node is a perfect match. Moreover, changing the device tree is much easier than changing the code. - Leo _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev