ARM: sa1100: remove irda references
authorArnd Bergmann <arnd@arndb.de>
Thu, 22 Sep 2022 13:16:38 +0000 (15:16 +0200)
committerArnd Bergmann <arnd@arndb.de>
Mon, 16 Jan 2023 08:25:48 +0000 (09:25 +0100)
IRDA support is long gone, so there is no need to declare the
platform device data.

See-also: d64c2a76123f ("staging: irda: remove the irda network stack and drivers")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
fixup sa1100 irda

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm/mach-sa1100/assabet.c
arch/arm/mach-sa1100/collie.c
arch/arm/mach-sa1100/generic.c
arch/arm/mach-sa1100/generic.h
arch/arm/mach-sa1100/h3600.c
include/linux/platform_data/irda-sa11x0.h [deleted file]

index 9919e0f..2eba112 100644 (file)
@@ -38,7 +38,6 @@
 
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
-#include <linux/platform_data/irda-sa11x0.h>
 #include <asm/mach/map.h>
 #include <mach/assabet.h>
 #include <linux/platform_data/mfd-mcp-sa11x0.h>
@@ -297,38 +296,6 @@ static struct resource assabet_flash_resources[] = {
 };
 
 
-/*
- * Assabet IrDA support code.
- */
-
-static int assabet_irda_set_power(struct device *dev, unsigned int state)
-{
-       static unsigned int bcr_state[4] = {
-               ASSABET_BCR_IRDA_MD0,
-               ASSABET_BCR_IRDA_MD1|ASSABET_BCR_IRDA_MD0,
-               ASSABET_BCR_IRDA_MD1,
-               0
-       };
-
-       if (state < 4)
-               ASSABET_BCR_frob(ASSABET_BCR_IRDA_MD1 | ASSABET_BCR_IRDA_MD0,
-                                bcr_state[state]);
-       return 0;
-}
-
-static void assabet_irda_set_speed(struct device *dev, unsigned int speed)
-{
-       if (speed < 4000000)
-               ASSABET_BCR_clear(ASSABET_BCR_IRDA_FSEL);
-       else
-               ASSABET_BCR_set(ASSABET_BCR_IRDA_FSEL);
-}
-
-static struct irda_platform_data assabet_irda_data = {
-       .set_power      = assabet_irda_set_power,
-       .set_speed      = assabet_irda_set_speed,
-};
-
 static struct ucb1x00_plat_data assabet_ucb1x00_data = {
        .reset          = assabet_ucb1x00_reset,
        .gpio_base      = -1,
@@ -618,7 +585,6 @@ static void __init assabet_init(void)
 #endif
        sa11x0_register_mtd(&assabet_flash_data, assabet_flash_resources,
                            ARRAY_SIZE(assabet_flash_resources));
-       sa11x0_register_irda(&assabet_irda_data);
        sa11x0_register_mcp(&assabet_mcp_data);
 
        if (!machine_has_neponset())
index 14c33ed..466d755 100644 (file)
@@ -44,7 +44,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
 #include <asm/mach/map.h>
-#include <linux/platform_data/irda-sa11x0.h>
 
 #include <asm/hardware/scoop.h>
 #include <asm/mach/sharpsl_param.h>
@@ -118,37 +117,6 @@ static struct gpiod_lookup_table collie_battery_gpiod_table = {
        },
 };
 
-static int collie_ir_startup(struct device *dev)
-{
-       int rc = gpio_request(COLLIE_GPIO_IR_ON, "IrDA");
-       if (rc)
-               return rc;
-       rc = gpio_direction_output(COLLIE_GPIO_IR_ON, 1);
-
-       if (!rc)
-               return 0;
-
-       gpio_free(COLLIE_GPIO_IR_ON);
-       return rc;
-}
-
-static void collie_ir_shutdown(struct device *dev)
-{
-       gpio_free(COLLIE_GPIO_IR_ON);
-}
-
-static int collie_ir_set_power(struct device *dev, unsigned int state)
-{
-       gpio_set_value(COLLIE_GPIO_IR_ON, !state);
-       return 0;
-}
-
-static struct irda_platform_data collie_ir_data = {
-       .startup = collie_ir_startup,
-       .shutdown = collie_ir_shutdown,
-       .set_power = collie_ir_set_power,
-};
-
 /*
  * Collie AC IN
  */
@@ -420,7 +388,6 @@ static void __init collie_init(void)
        sa11x0_register_mtd(&collie_flash_data, collie_flash_resources,
                            ARRAY_SIZE(collie_flash_resources));
        sa11x0_register_mcp(&collie_mcp_data);
-       sa11x0_register_irda(&collie_ir_data);
 
        sharpsl_save_param();
 }
index 6c21f21..0c58604 100644 (file)
@@ -250,25 +250,6 @@ void sa11x0_register_mtd(struct flash_platform_data *flash,
        sa11x0_register_device(&sa11x0mtd_device, flash);
 }
 
-static struct resource sa11x0ir_resources[] = {
-       DEFINE_RES_MEM(__PREG(Ser2UTCR0), 0x24),
-       DEFINE_RES_MEM(__PREG(Ser2HSCR0), 0x1c),
-       DEFINE_RES_MEM(__PREG(Ser2HSCR2), 0x04),
-       DEFINE_RES_IRQ(IRQ_Ser2ICP),
-};
-
-static struct platform_device sa11x0ir_device = {
-       .name           = "sa11x0-ir",
-       .id             = -1,
-       .num_resources  = ARRAY_SIZE(sa11x0ir_resources),
-       .resource       = sa11x0ir_resources,
-};
-
-void sa11x0_register_irda(struct irda_platform_data *irda)
-{
-       sa11x0_register_device(&sa11x0ir_device, irda);
-}
-
 static struct resource sa1100_rtc_resources[] = {
        DEFINE_RES_MEM(0x90010000, 0x40),
        DEFINE_RES_IRQ_NAMED(IRQ_RTC1Hz, "rtc 1Hz"),
index 158a4fd..5fe0d4f 100644 (file)
@@ -30,9 +30,6 @@ struct resource;
 void sa11x0_register_mtd(struct flash_platform_data *flash,
                         struct resource *res, int nr);
 
-struct irda_platform_data;
-void sa11x0_register_irda(struct irda_platform_data *irda);
-
 struct mcp_plat_data;
 void sa11x0_ppc_configure_mcp(void);
 void sa11x0_register_mcp(struct mcp_plat_data *data);
index baf5291..5e25dfa 100644 (file)
@@ -14,7 +14,6 @@
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
-#include <linux/platform_data/irda-sa11x0.h>
 
 #include <mach/h3xxx.h>
 #include <mach/irqs.h>
@@ -90,48 +89,11 @@ static void __init h3600_map_io(void)
        h3xxx_map_io();
 }
 
-/*
- * This turns the IRDA power on or off on the Compaq H3600
- */
-static struct gpio h3600_irda_gpio[] = {
-       { H3600_EGPIO_IR_ON,    GPIOF_OUT_INIT_LOW, "IrDA power" },
-       { H3600_EGPIO_IR_FSEL,  GPIOF_OUT_INIT_LOW, "IrDA fsel" },
-};
-
-static int h3600_irda_set_power(struct device *dev, unsigned int state)
-{
-       gpio_set_value(H3600_EGPIO_IR_ON, state);
-       return 0;
-}
-
-static void h3600_irda_set_speed(struct device *dev, unsigned int speed)
-{
-       gpio_set_value(H3600_EGPIO_IR_FSEL, !(speed < 4000000));
-}
-
-static int h3600_irda_startup(struct device *dev)
-{
-       return gpio_request_array(h3600_irda_gpio, sizeof(h3600_irda_gpio));
-}
-
-static void h3600_irda_shutdown(struct device *dev)
-{
-       return gpio_free_array(h3600_irda_gpio, sizeof(h3600_irda_gpio));
-}
-
-static struct irda_platform_data h3600_irda_data = {
-       .set_power      = h3600_irda_set_power,
-       .set_speed      = h3600_irda_set_speed,
-       .startup        = h3600_irda_startup,
-       .shutdown       = h3600_irda_shutdown,
-};
-
 static void __init h3600_mach_init(void)
 {
        h3xxx_mach_init();
 
        sa11x0_register_lcd(&h3600_lcd_info);
-       sa11x0_register_irda(&h3600_irda_data);
 }
 
 MACHINE_START(H3600, "Compaq iPAQ H3600")
diff --git a/include/linux/platform_data/irda-sa11x0.h b/include/linux/platform_data/irda-sa11x0.h
deleted file mode 100644 (file)
index 7db59c9..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- *  arch/arm/include/asm/mach/irda.h
- *
- *  Copyright (C) 2004 Russell King.
- */
-#ifndef __ASM_ARM_MACH_IRDA_H
-#define __ASM_ARM_MACH_IRDA_H
-
-struct irda_platform_data {
-       int (*startup)(struct device *);
-       void (*shutdown)(struct device *);
-       int (*set_power)(struct device *, unsigned int state);
-       void (*set_speed)(struct device *, unsigned int speed);
-};
-
-#endif