Remove misleading typedef and redundant suffix from struct nand_flash_controller.
return ERROR_NAND_OPERATION_FAILED;
}
-nand_flash_controller_t davinci_nand_controller = {
+struct nand_flash_controller davinci_nand_controller = {
.name = "davinci",
.nand_device_command = davinci_nand_device_command,
.register_commands = davinci_register_commands,
return ERROR_OK;
}
-nand_flash_controller_t lpc3180_nand_controller = {
+struct nand_flash_controller lpc3180_nand_controller = {
.name = "lpc3180",
.nand_device_command = lpc3180_nand_device_command,
.register_commands = lpc3180_register_commands,
return ERROR_OK;
}
-nand_flash_controller_t imx31_nand_flash_controller = {
+struct nand_flash_controller imx31_nand_flash_controller = {
.name = "imx31",
.nand_device_command = &imx31_nand_device_command,
.register_commands = &imx31_register_commands,
/* NAND flash controller
*/
-extern nand_flash_controller_t davinci_nand_controller;
-extern nand_flash_controller_t lpc3180_nand_controller;
-extern nand_flash_controller_t orion_nand_controller;
-extern nand_flash_controller_t s3c2410_nand_controller;
-extern nand_flash_controller_t s3c2412_nand_controller;
-extern nand_flash_controller_t s3c2440_nand_controller;
-extern nand_flash_controller_t s3c2443_nand_controller;
-extern nand_flash_controller_t imx31_nand_flash_controller;
-
-/* extern nand_flash_controller_t boundary_scan_nand_controller; */
-
-static nand_flash_controller_t *nand_flash_controllers[] =
+extern struct nand_flash_controller davinci_nand_controller;
+extern struct nand_flash_controller lpc3180_nand_controller;
+extern struct nand_flash_controller orion_nand_controller;
+extern struct nand_flash_controller s3c2410_nand_controller;
+extern struct nand_flash_controller s3c2412_nand_controller;
+extern struct nand_flash_controller s3c2440_nand_controller;
+extern struct nand_flash_controller s3c2443_nand_controller;
+extern struct nand_flash_controller imx31_nand_flash_controller;
+
+/* extern struct nand_flash_controller boundary_scan_nand_controller; */
+
+static struct nand_flash_controller *nand_flash_controllers[] =
{
&davinci_nand_controller,
&lpc3180_nand_controller,
#define __NAND_DEVICE_COMMAND(name) \
COMMAND_HELPER(name, struct nand_device_s *nand)
-typedef struct nand_flash_controller_s
+struct nand_flash_controller
{
char *name;
__NAND_DEVICE_COMMAND((*nand_device_command));
int (*read_page)(struct nand_device_s *nand, uint32_t page, uint8_t *data, uint32_t data_size, uint8_t *oob, uint32_t oob_size);
int (*controller_ready)(struct nand_device_s *nand, int timeout);
int (*nand_ready)(struct nand_device_s *nand, int timeout);
-} nand_flash_controller_t;
+};
#define NAND_DEVICE_COMMAND_HANDLER(name) static __NAND_DEVICE_COMMAND(name)
typedef struct nand_device_s
{
- nand_flash_controller_t *controller;
+ struct nand_flash_controller *controller;
void *controller_priv;
struct nand_manufacturer_s *manufacturer;
struct nand_info_s *device;
return ERROR_OK;
}
-nand_flash_controller_t orion_nand_controller =
+struct nand_flash_controller orion_nand_controller =
{
.name = "orion",
.command = orion_nand_command,
return 0;
}
-nand_flash_controller_t s3c2410_nand_controller = {
+struct nand_flash_controller s3c2410_nand_controller = {
.name = "s3c2410",
.nand_device_command = &s3c2410_nand_device_command,
.register_commands = &s3c24xx_register_commands,
return ERROR_OK;
}
-nand_flash_controller_t s3c2412_nand_controller = {
+struct nand_flash_controller s3c2412_nand_controller = {
.name = "s3c2412",
.nand_device_command = &s3c2412_nand_device_command,
.register_commands = &s3c24xx_register_commands,
return ERROR_OK;
}
-nand_flash_controller_t s3c2440_nand_controller = {
+struct nand_flash_controller s3c2440_nand_controller = {
.name = "s3c2440",
.nand_device_command = &s3c2440_nand_device_command,
.register_commands = &s3c24xx_register_commands,
return ERROR_OK;
}
-nand_flash_controller_t s3c2443_nand_controller = {
+struct nand_flash_controller s3c2443_nand_controller = {
.name = "s3c2443",
.nand_device_command = &s3c2443_nand_device_command,
.register_commands = &s3c24xx_register_commands,