From: Wolfgang Denk Date: Mon, 06 Sep 2010 21:35:46 +0200 Subject: [U-Boot] [PATCH] IDE: Don't assume there are always two devices per bus In-Reply-To: <4C8521A8.6050107@free.fr> References: <20100815213046.A427B1606A5@gemini.denx.de> <1281937660-25632-2-git-send-email-user@aphrodite> <4C76691D.9070701@dawes.za.net> <4C8201CB.9080606@free.fr> <20100905221935.ACE1E1506AA@gemini.denx.de> <4C848200.7080401@free.fr> <20100906060557.793391506AA@gemini.denx.de> <4C848E1A.1070003@free.fr> <20100906081806.C2F9E153798@gemini.denx.de> <4C84D13C.8040702@free.fr> <20100906125039.26BDBB7164@gemini.denx.de> <4C8521A8.6050107@free.fr> Message-ID: <20100906193546.E681A1506AA@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Albert ARIBAUD, In message <4C8521A8.6050107@free.fr> you wrote: > > I don't see much benefit in allocating dynamically rather than > statically unless you are really tight on RAM, which seems to not fit > with a board which has many busses and disks. > > Plus, IDE may not know about hotplugging, but SATA does, which means I > can do an ide_init(), plug or unplug disks, and do an ide_init() again > with a different number of devices. Dynamic allocation requires resizing > the allocated arrays; static is just less trouble. > > Anyway, static vs dynamic can be done in a second step after adding N > busses (and thereby fixing the issue of ghost devices that prompted > Rogan's patch proposal). OK, I agree. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de In theory, there is no difference between theory and practice. In practice, however, there is.