RE: [PATCH v1 2/3] OMAP4: Ethernet: KS8851 Board Support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: linux-omap-owner@xxxxxxxxxxxxxxx 
> [mailto:linux-omap-owner@xxxxxxxxxxxxxxx] On Behalf Of Arce, Abraham
> Sent: Wednesday, May 05, 2010 12:40 PM
> To: linux-omap@xxxxxxxxxxxxxxx; 
> spi-devel-general@xxxxxxxxxxxxxxxxxxxxx
> Subject: [PATCH v1 2/3] OMAP4: Ethernet: KS8851 Board Support
> 
> 
> Enable Micrel KS8851 SPI network chip for OMAP4430
> 
> Signed-off-by: Abraham Arce <x0066660@xxxxxx>
> ---
>  arch/arm/mach-omap2/board-4430sdp.c |   30 
> ++++++++++++++++++++++++++++++
>  1 files changed, 30 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/board-4430sdp.c 
> b/arch/arm/mach-omap2/board-4430sdp.c
> index b88f28c..801c2a7 100644
> --- a/arch/arm/mach-omap2/board-4430sdp.c
> +++ b/arch/arm/mach-omap2/board-4430sdp.c
> @@ -18,6 +18,7 @@
>  #include <linux/io.h>
>  #include <linux/gpio.h>
>  #include <linux/usb/otg.h>
> +#include <linux/spi/spi.h>
>  
>  #include <mach/hardware.h>
>  #include <asm/mach-types.h>
> @@ -32,6 +33,30 @@
>  #include <asm/hardware/gic.h>
>  #include <asm/hardware/cache-l2x0.h>
>  
> +#define ETHERNET_KS8851_IRQ		34
> +#define ETHERNET_KS8851_POWER_ENABLE	48
> +#define ETHERNET_KS8851_QUART		138
> +
> +static struct spi_board_info sdp4430_spi_board_info[] __initdata = {
> +	{
> +		.modalias               = "ks8851",
> +		.bus_num                = 1,
> +		.chip_select            = 0,
> +		.max_speed_hz           = 24000000,
> +		.irq                    = ETHERNET_KS8851_IRQ,
> +	},
> +};
> +
> +static void omap_ethernet_init(void)
> +{
> +	gpio_request(ETHERNET_KS8851_POWER_ENABLE, "ethernet");
> +	gpio_direction_output(ETHERNET_KS8851_POWER_ENABLE, 1);
> +	gpio_request(ETHERNET_KS8851_QUART, "quart");
> +	gpio_direction_output(ETHERNET_KS8851_QUART, 1);
> +	gpio_request(ETHERNET_KS8851_IRQ, "ks8851");

Any reason for not checking return value of gpio_request()?

-Manjunath--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux