From: Reinhard Meyer Date: Mon, 1 Mar 2004 14:24:30 +0100 Subject: [U-Boot-Users] Patch generalizing IDE Reset function for MPC5200 References: <20040301120014.D7915C0655@atlas.denx.de> Message-ID: <004101c3ff90$8e486af0$644ba8c0@alb.sub.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello, if a real genuine generalization is wanted, the ide_set_reset () function must be moved to the board specific files. "Generally" it cannot be assumed that a GPIO Port is used in a non-inverting way to perform a IDE_Reset. Therefore I will now move "void ide_set_reset (int idereset)" to our top5200.c and leave the mpc5xxx/ide.c untouched. best regards Reinhard ----- Original Message ----- > > The following patch generalises the use of PSC1.4 for IDE Reset. The idea > > behind is that most probably many 5200 designs will be similiar to IceCube, > > Such assumptions are know to fail on the very next board that will be > added. > > > Instead of continuosly adding more and more boards into the #if defined () > > chain, one define > > CONFIG_IDE_RESET_USE_PSC1_4 can be added to the board's configuration file. > > Urggh. What an ugly name. > > > If someone else uses another I/O port, that can be easyly added in a > > similiar way. > > Yes, and we end up "adding more and more boards into the "#define > CONFIG_IDE_RESET_USE_this" and "#define CONFIG_IDE_RESET_USE_that" > chain. > > Sorry, this code is ugly and I reject it. > > ..... > > How about changing this into something like?? > > include/configs/???.h: > ... > #define CONFIG_IDE_RESET_PIN GPIO_PSC1_4 THAT assumption will fail on the first board that does not use a GPIO pin for reset, or uses one that is inverted.