command: Remove the cmd_tbl_t typedef
[oweals/u-boot.git] / drivers / net / e1000_spi.c
index cb5f93d652348f7c19c7860a57943f9cad8aac93..dcb561ff79e88f3de5fee73b5debdb49da807423 100644 (file)
@@ -1,6 +1,8 @@
 #include <common.h>
+#include <command.h>
 #include <console.h>
 #include "e1000.h"
+#include <malloc.h>
 #include <linux/compiler.h>
 
 /*-----------------------------------------------------------------------
@@ -77,11 +79,6 @@ static inline struct e1000_hw *e1000_hw_from_spi(struct spi_slave *spi)
        return container_of(spi, struct e1000_hw, spi);
 }
 
-/* Not sure why all of these are necessary */
-void spi_init_r(void) { /* Nothing to do */ }
-void spi_init_f(void) { /* Nothing to do */ }
-void spi_init(void)   { /* Nothing to do */ }
-
 struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
                unsigned int max_hz, unsigned int mode)
 {
@@ -319,8 +316,8 @@ static int e1000_spi_eeprom_program(struct e1000_hw *hw,
        return 0;
 }
 
-static int do_e1000_spi_show(cmd_tbl_t *cmdtp, struct e1000_hw *hw,
-               int argc, char * const argv[])
+static int do_e1000_spi_show(struct cmd_tbl *cmdtp, struct e1000_hw *hw,
+                            int argc, char *const argv[])
 {
        unsigned int length = 0;
        u16 i, offset = 0;
@@ -388,8 +385,8 @@ static int do_e1000_spi_show(cmd_tbl_t *cmdtp, struct e1000_hw *hw,
        return 0;
 }
 
-static int do_e1000_spi_dump(cmd_tbl_t *cmdtp, struct e1000_hw *hw,
-               int argc, char * const argv[])
+static int do_e1000_spi_dump(struct cmd_tbl *cmdtp, struct e1000_hw *hw,
+                            int argc, char *const argv[])
 {
        unsigned int length;
        u16 offset;
@@ -433,8 +430,8 @@ static int do_e1000_spi_dump(cmd_tbl_t *cmdtp, struct e1000_hw *hw,
        return 0;
 }
 
-static int do_e1000_spi_program(cmd_tbl_t *cmdtp, struct e1000_hw *hw,
-               int argc, char * const argv[])
+static int do_e1000_spi_program(struct cmd_tbl *cmdtp, struct e1000_hw *hw,
+                               int argc, char *const argv[])
 {
        unsigned int length;
        const void *source;
@@ -468,8 +465,8 @@ static int do_e1000_spi_program(cmd_tbl_t *cmdtp, struct e1000_hw *hw,
        return 0;
 }
 
-static int do_e1000_spi_checksum(cmd_tbl_t *cmdtp, struct e1000_hw *hw,
-               int argc, char * const argv[])
+static int do_e1000_spi_checksum(struct cmd_tbl *cmdtp, struct e1000_hw *hw,
+                                int argc, char *const argv[])
 {
        uint16_t i, length, checksum = 0, checksum_reg;
        uint16_t *buffer;
@@ -544,8 +541,8 @@ static int do_e1000_spi_checksum(cmd_tbl_t *cmdtp, struct e1000_hw *hw,
        return 0;
 }
 
-int do_e1000_spi(cmd_tbl_t *cmdtp, struct e1000_hw *hw,
-               int argc, char * const argv[])
+int do_e1000_spi(struct cmd_tbl *cmdtp, struct e1000_hw *hw,
+                int argc, char *const argv[])
 {
        if (argc < 1) {
                cmd_usage(cmdtp);