Skip to contentSkip to conversation

ata: merge the ata_piix driver

PATCH Superseded Dave Liu 2 participants 3 messages Mar 26, 2008 Block layer

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Dave Liu

author
#0 lore raw

PATCH v3 1/10 ata: merge the ata_piix driver

move the cmd_sata.c from common/ to drivers/ata_piix.c, the cmd_sata.c have some part of ata_piix controller drivers. consolidate the driver to have better framework.

---
 common/Makefile             |    1 -
 common/cmd_sata.c           |  712 -------------------------------------------
 drivers/block/ata_piix.c    |  672 ++++++++++++++++++++++++++++++++++++++++-
 include/configs/sc520_cdp.h |    1 -
 include/sata.h              |   16 -
 5 files changed, 671 insertions(+), 731 deletions(-)
 delete mode 100644 common/cmd_sata.c
common/Makefile +0 -1
index 56176ca..eda5113 100644
@@ -86,7 +86,6 @@ COBJS-y += cmd_pcmcia.o
 COBJS-$(CONFIG_CMD_PORTIO) += cmd_portio.o
 COBJS-$(CONFIG_CMD_REGINFO) += cmd_reginfo.o
 COBJS-$(CONFIG_CMD_REISER) += cmd_reiser.o
-COBJS-y += cmd_sata.o
 COBJS-$(CONFIG_CMD_SCSI) += cmd_scsi.o
 COBJS-$(CONFIG_CMD_SETEXPR) += cmd_setexpr.o
 COBJS-$(CONFIG_CMD_SPI) += cmd_spi.o
common/cmd_sata.c deleted +0 -712

712 lines not on this page · raw message

drivers/block/ata_piix.c +671 -1

694 lines not on this page · raw message

include/configs/sc520_cdp.h +0 -1
index 8491d97..58d656c 100644
@@ -192,7 +192,6 @@
 /************************************************************
 *SATA/Native Stuff
 ************************************************************/
-#define CFG_SATA_SUPPORTED      1
 #define CFG_SATA_MAXBUS         2       /*Max Sata buses supported */
 #define CFG_SATA_DEVS_PER_BUS   2      /*Max no. of devices per bus/port */
 #define CFG_SATA_MAXDEVICES     (CFG_SATA_MAXBUS* CFG_SATA_DEVS_PER_BUS)
include/sata.h +0 -16
index 165b471..bb1acb3 100644
@@ -77,32 +77,16 @@ u8 sata_chk_status (struct sata_ioports *ioaddr);
 ulong sata_read (int device, ulong blknr,lbaint_t blkcnt, void * buffer);
 ulong sata_write (int device,ulong blknr, lbaint_t blkcnt, void * buffer);
 void msleep (int count);
-#else
-extern int sata_bus_softreset (int num);
-extern void sata_identify (int num, int dev);
-extern void sata_port (struct sata_ioports *ioport);
-extern void set_Feature_cmd (int num, int dev);
-extern ulong sata_read (int device, ulong blknr,
-			lbaint_t blkcnt, void * buffer);
-extern ulong sata_write (int device, ulong blknr,
-			lbaint_t blkcnt, void * buffer);
-extern void msleep (int count);
 #endif
 
 /************DRIVER SPECIFIC DEFINITIONS AND DECLARATIONS**************/
 
 #ifdef DRV_DECL			/*Driver specific declaration */
 int init_sata (void);
-#else
-extern int init_sata (void);
 #endif
 
 #ifdef DRV_DECL			/*Defines Driver Specific variables */
 struct sata_port port[CFG_SATA_MAXBUS];
 block_dev_desc_t sata_dev_desc[CFG_SATA_MAXDEVICES];
 int curr_dev = -1;
-#else
-extern struct sata_port port[CFG_SATA_MAXBUS];
-extern block_dev_desc_t sata_dev_desc[CFG_SATA_MAXDEVICES];
-extern int curr_dev;
 #endif
Signature · 1 line
1.5.4.rc4
author
#1 lore raw

PATCH v3 1/10 ata: merge the ata_piix driver

<snip>

drivers/block/ata_piix.c init_sata (void) · line 242

Quoted 12 lines
drivers/block/ata_piix.c +12 -0
+static void
+output_data (struct sata_ioports *ioaddr, ulong * sect_buf, int words)
+{
+//	outsw (ioaddr->data_addr, sect_buf, words << 1);
+}
+
+static int
+input_data (struct sata_ioports *ioaddr, ulong * sect_buf, int words)
+{
+//	insw (ioaddr->data_addr, sect_buf, words << 1);
+	return 0;
+}

Sorry for that, It should not be commented.
I will resend PATCH 1/10 and PATCH 3/10.

Thanks,
Dave

#2 lore raw

PATCH v3 1/10 ata: merge the ata_piix driver

Quoted 17 lines · In message <[email protected]> you wrote:

<snip>

drivers/block/ata_piix.c init_sata (void) · line 242

Quoted 12 lines
drivers/block/ata_piix.c +12 -0
+static void
+output_data (struct sata_ioports *ioaddr, ulong * sect_buf, int words)
+{
+//	outsw (ioaddr->data_addr, sect_buf, words << 1);
+}
+
+static int
+input_data (struct sata_ioports *ioaddr, ulong * sect_buf, int words)
+{
+//	insw (ioaddr->data_addr, sect_buf, words << 1);
+	return 0;
+}

Sorry for that, It should not be commented.
I will resend PATCH 1/10 and PATCH 3/10.

Especially it should not be commented using C++ comments!

Best regards,

Wolfgang Denk

Signature · 4 lines
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
Small is beautiful.