Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e814fb63 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge branch 'samsung/ohci' into next/drivers

* samsung/ohci:
  ARM: EXYNOS: Add USB OHCI support to ORIGEN board
  USB: Add Samsung Exynos OHCI diver
  ARM: EXYNOS: Add USB OHCI support to SMDKV310 board
  ARM: EXYNOS: Add USB OHCI device
parents 4551ae0a fcf93235
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -82,6 +82,11 @@ config EXYNOS4_DEV_DWMCI
	help
	  Compile in platform device definitions for DWMCI

config EXYNOS4_DEV_USB_OHCI
	bool
	help
	  Compile in platform device definition for USB OHCI

config EXYNOS4_SETUP_I2C1
	bool
	help
@@ -179,6 +184,7 @@ config MACH_SMDKV310
	select SAMSUNG_DEV_KEYPAD
	select EXYNOS4_DEV_PD
	select SAMSUNG_DEV_PWM
	select EXYNOS4_DEV_USB_OHCI
	select EXYNOS4_DEV_SYSMMU
	select EXYNOS4_SETUP_FIMD0
	select EXYNOS4_SETUP_I2C1
@@ -288,6 +294,7 @@ config MACH_ORIGEN
	select SAMSUNG_DEV_BACKLIGHT
	select SAMSUNG_DEV_PWM
	select EXYNOS4_DEV_PD
	select EXYNOS4_DEV_USB_OHCI
	select EXYNOS4_SETUP_FIMD0
	select EXYNOS4_SETUP_SDHCI
	select EXYNOS4_SETUP_USB_PHY
+1 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ obj-$(CONFIG_EXYNOS4_DEV_AHCI) += dev-ahci.o
obj-$(CONFIG_EXYNOS4_DEV_PD)		+= dev-pd.o
obj-$(CONFIG_EXYNOS4_DEV_SYSMMU)	+= dev-sysmmu.o
obj-$(CONFIG_EXYNOS4_DEV_DWMCI)		+= dev-dwmci.o
obj-$(CONFIG_EXYNOS4_DEV_USB_OHCI)	+= dev-ohci.o

obj-$(CONFIG_EXYNOS4_SETUP_FIMC)	+= setup-fimc.o
obj-$(CONFIG_EXYNOS4_SETUP_FIMD0)	+= setup-fimd0.o
+52 −0
Original line number Diff line number Diff line
/* linux/arch/arm/mach-exynos/dev-ohci.c
 *
 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
 *		http://www.samsung.com
 *
 * EXYNOS - OHCI support
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#include <linux/dma-mapping.h>
#include <linux/platform_device.h>

#include <mach/irqs.h>
#include <mach/map.h>
#include <mach/ohci.h>

#include <plat/devs.h>
#include <plat/usb-phy.h>

static struct resource exynos4_ohci_resource[] = {
	[0] = DEFINE_RES_MEM(EXYNOS4_PA_OHCI, SZ_256),
	[1] = DEFINE_RES_IRQ(IRQ_USB_HOST),
};

static u64 exynos4_ohci_dma_mask = DMA_BIT_MASK(32);

struct platform_device exynos4_device_ohci = {
	.name		= "exynos-ohci",
	.id		= -1,
	.num_resources	= ARRAY_SIZE(exynos4_ohci_resource),
	.resource	= exynos4_ohci_resource,
	.dev		= {
		.dma_mask		= &exynos4_ohci_dma_mask,
		.coherent_dma_mask	= DMA_BIT_MASK(32),
	}
};

void __init exynos4_ohci_set_platdata(struct exynos4_ohci_platdata *pd)
{
	struct exynos4_ohci_platdata *npd;

	npd = s3c_set_platdata(pd, sizeof(struct exynos4_ohci_platdata),
			&exynos4_device_ohci);

	if (!npd->phy_init)
		npd->phy_init = s5p_usb_phy_init;
	if (!npd->phy_exit)
		npd->phy_exit = s5p_usb_phy_exit;
}
+1 −0
Original line number Diff line number Diff line
@@ -107,6 +107,7 @@
#define EXYNOS4_PA_SROMC		0x12570000

#define EXYNOS4_PA_EHCI			0x12580000
#define EXYNOS4_PA_OHCI			0x12590000
#define EXYNOS4_PA_HSPHY		0x125B0000
#define EXYNOS4_PA_MFC			0x13400000

+21 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2011 Samsung Electronics Co.Ltd
 *		http://www.samsung.com/
 *
 * This program is free software; you can redistribute  it and/or modify it
 * under  the terms of  the GNU General  Public License as published by the
 * Free Software Foundation;  either version 2 of the  License, or (at your
 * option) any later version.
 */

#ifndef __MACH_EXYNOS_OHCI_H
#define __MACH_EXYNOS_OHCI_H

struct exynos4_ohci_platdata {
	int (*phy_init)(struct platform_device *pdev, int type);
	int (*phy_exit)(struct platform_device *pdev, int type);
};

extern void exynos4_ohci_set_platdata(struct exynos4_ohci_platdata *pd);

#endif /* __MACH_EXYNOS_OHCI_H */
Loading