Update to 3.10-rc3

Refresh/drop various patches.

aufs: Update to aufs3.x-rcN-20130520

svn path=/dists/trunk/linux/; revision=20176
This commit is contained in:
Ben Hutchings 2013-06-02 18:14:09 +00:00
parent 15dc8c6034
commit 41bc6e7895
32 changed files with 347 additions and 2669 deletions

9
debian/changelog vendored
View File

@ -1,3 +1,12 @@
linux (3.10~rc3-1~experimental.1.dsc) UNRELEASED; urgency=low
* New upstream release candidate
[ Ben Hutchings ]
* aufs: Update to aufs3.x-rcN-20130520
-- Ben Hutchings <ben@decadent.org.uk> Sun, 02 Jun 2013 17:46:32 +0100
linux (3.9.4-1) unstable; urgency=low
* New upstream release: http://kernelnewbies.org/Linux_3.9

View File

@ -95,7 +95,7 @@ upstream submission.
fw_size = firmware->size / sizeof(u32);
--- a/drivers/bluetooth/ath3k.c
+++ b/drivers/bluetooth/ath3k.c
@@ -325,10 +325,8 @@ static int ath3k_load_patch(struct usb_d
@@ -327,10 +327,8 @@ static int ath3k_load_patch(struct usb_d
fw_version.rom_version);
ret = request_firmware(&firmware, filename, &udev->dev);
@ -107,7 +107,7 @@ upstream submission.
pt_version.rom_version = *(int *)(firmware->data + firmware->size - 8);
pt_version.build_version = *(int *)
@@ -387,10 +385,8 @@ static int ath3k_load_syscfg(struct usb_
@@ -389,10 +387,8 @@ static int ath3k_load_syscfg(struct usb_
fw_version.rom_version, clk_value, ".dfu");
ret = request_firmware(&firmware, filename, &udev->dev);
@ -231,7 +231,7 @@ upstream submission.
where = 0;
--- a/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
@@ -499,10 +499,8 @@ nvc0_graph_ctor_fw(struct nvc0_graph_pri
@@ -513,10 +513,8 @@ nvc0_graph_ctor_fw(struct nvc0_graph_pri
if (ret) {
snprintf(f, sizeof(f), "nouveau/%s", fwname);
ret = request_firmware(&fw, f, &device->pdev->dev);
@ -260,7 +260,7 @@ upstream submission.
printk(KERN_ERR
--- a/drivers/gpu/drm/radeon/ni.c
+++ b/drivers/gpu/drm/radeon/ni.c
@@ -400,10 +400,6 @@ out:
@@ -676,10 +676,6 @@ out:
platform_device_unregister(pdev);
if (err) {
@ -273,7 +273,7 @@ upstream submission.
release_firmware(rdev->me_fw);
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -1015,10 +1015,7 @@ static int r100_cp_init_microcode(struct
@@ -1044,10 +1044,7 @@ static int r100_cp_init_microcode(struct
err = request_firmware(&rdev->me_fw, fw_name, &pdev->dev);
platform_device_unregister(pdev);
@ -380,7 +380,7 @@ upstream submission.
}
--- a/drivers/media/usb/dvb-usb/dib0700_devices.c
+++ b/drivers/media/usb/dvb-usb/dib0700_devices.c
@@ -2108,12 +2108,9 @@ static int stk9090m_frontend_attach(stru
@@ -2256,12 +2256,9 @@ static int stk9090m_frontend_attach(stru
dib9000_i2c_enumeration(&adap->dev->i2c_adap, 1, 0x10, 0x80);
@ -395,7 +395,7 @@ upstream submission.
stk9090m_config.microcode_B_fe_size = state->frontend_firmware->size;
stk9090m_config.microcode_B_fe_buffer = state->frontend_firmware->data;
@@ -2174,12 +2171,9 @@ static int nim9090md_frontend_attach(str
@@ -2322,12 +2319,9 @@ static int nim9090md_frontend_attach(str
msleep(20);
dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1);
@ -533,7 +533,7 @@ upstream submission.
if (state->microcode == NULL) {
--- a/drivers/media/dvb-frontends/drxk_hard.c
+++ b/drivers/media/dvb-frontends/drxk_hard.c
@@ -6261,12 +6261,6 @@ static void load_firmware_cb(const struc
@@ -6229,12 +6229,6 @@ static void load_firmware_cb(const struc
dprintk(1, ": %s\n", fw ? "firmware loaded" : "firmware not loaded");
if (!fw) {
@ -730,18 +730,18 @@ upstream submission.
}
--- a/drivers/media/common/siano/smscoreapi.c
+++ b/drivers/media/common/siano/smscoreapi.c
@@ -639,10 +639,8 @@ static int smscore_load_firmware_from_fi
@@ -1164,10 +1164,8 @@ static int smscore_load_firmware_from_fi
return -EINVAL;
rc = request_firmware(&fw, filename, coredev->device);
rc = request_firmware(&fw, fw_filename, coredev->device);
- if (rc < 0) {
- sms_info("failed to open \"%s\"", filename);
- sms_info("failed to open \"%s\"", fw_filename);
+ if (rc)
return rc;
- }
sms_info("read FW %s, size=%zd", filename, fw->size);
fw_buffer = kmalloc(ALIGN(fw->size, SMS_ALLOC_ALIGNMENT),
GFP_KERNEL | GFP_DMA);
sms_info("read fw %s, buffer size=0x%zx", fw_filename, fw->size);
fw_buf = kmalloc(ALIGN(fw->size, SMS_ALLOC_ALIGNMENT),
GFP_KERNEL | GFP_DMA);
--- a/drivers/media/pci/ttpci/av7110.c
+++ b/drivers/media/pci/ttpci/av7110.c
@@ -1531,16 +1531,9 @@ static int get_firmware(struct av7110* a
@ -838,7 +838,7 @@ upstream submission.
fw_data = (void *)fw_entry->data;
--- a/drivers/media/pci/bt8xx/bttv-cards.c
+++ b/drivers/media/pci/bt8xx/bttv-cards.c
@@ -3752,10 +3752,8 @@ static int pvr_boot(struct bttv *btv)
@@ -3759,10 +3759,8 @@ static int pvr_boot(struct bttv *btv)
int rc;
rc = request_firmware(&fw_entry, "hcwamc.rbf", &btv->c.pci->dev);
@ -927,22 +927,20 @@ upstream submission.
}
--- a/drivers/media/usb/cx231xx/cx231xx-417.c
+++ b/drivers/media/usb/cx231xx/cx231xx-417.c
@@ -979,14 +979,8 @@ static int cx231xx_load_firmware(struct
@@ -995,12 +995,8 @@ static int cx231xx_load_firmware(struct
retval = request_firmware(&firmware, CX231xx_FIRM_IMAGE_NAME,
&dev->udev->dev);
- if (retval != 0) {
- printk(KERN_ERR
- "ERROR: Hotplug firmware request failed (%s).\n",
- pr_err("ERROR: Hotplug firmware request failed (%s).\n",
- CX231xx_FIRM_IMAGE_NAME);
- printk(KERN_ERR "Please fix your hotplug setup, the board will "
- "not work without firmware loaded!\n");
- pr_err("Please fix your hotplug setup, the board will not work without firmware loaded!\n");
+ if (retval != 0)
return -1;
- }
if (firmware->size != CX231xx_FIRM_IMAGE_SIZE) {
printk(KERN_ERR "ERROR: Firmware size mismatch "
pr_err("ERROR: Firmware size mismatch (have %zd, expected %d)\n",
--- a/drivers/media/pci/cx23885/cx23885-417.c
+++ b/drivers/media/pci/cx23885/cx23885-417.c
@@ -930,14 +930,8 @@ static int cx23885_load_firmware(struct
@ -1066,7 +1064,7 @@ upstream submission.
--- a/drivers/media/usb/s2255/s2255drv.c
+++ b/drivers/media/usb/s2255/s2255drv.c
@@ -2585,10 +2585,8 @@ static int s2255_probe(struct usb_interf
@@ -2568,10 +2568,8 @@ static int s2255_probe(struct usb_interf
}
/* load the first chunk */
if (request_firmware(&dev->fw_data->fw,
@ -1121,7 +1119,7 @@ upstream submission.
__func__, fw->size);
--- a/drivers/media/usb/tlg2300/pd-main.c
+++ b/drivers/media/usb/tlg2300/pd-main.c
@@ -220,10 +220,8 @@ static int firmware_download(struct usb_
@@ -219,10 +219,8 @@ static int firmware_download(struct usb_
size_t max_packet_size;
ret = request_firmware(&fw, firmware_name, &udev->dev);
@ -1180,7 +1178,7 @@ upstream submission.
remaining = typhoon_fw->size;
--- a/drivers/net/ethernet/adaptec/starfire.c
+++ b/drivers/net/ethernet/adaptec/starfire.c
@@ -1015,11 +1015,8 @@ static int netdev_open(struct net_device
@@ -1017,11 +1017,8 @@ static int netdev_open(struct net_device
#endif /* VLAN_SUPPORT */
retval = request_firmware(&fw_rx, FIRMWARE_RX, &np->pci_dev->dev);
@ -1193,7 +1191,7 @@ upstream submission.
if (fw_rx->size % 4) {
printk(KERN_ERR "starfire: bogus length %zu in \"%s\"\n",
fw_rx->size, FIRMWARE_RX);
@@ -1027,11 +1024,8 @@ static int netdev_open(struct net_device
@@ -1029,11 +1026,8 @@ static int netdev_open(struct net_device
goto out_rx;
}
retval = request_firmware(&fw_tx, FIRMWARE_TX, &np->pci_dev->dev);
@ -1223,7 +1221,7 @@ upstream submission.
--- a/drivers/net/ethernet/broadcom/bnx2.c
+++ b/drivers/net/ethernet/broadcom/bnx2.c
@@ -3680,16 +3680,13 @@ static int bnx2_request_uncached_firmwar
@@ -3679,16 +3679,13 @@ static int bnx2_request_uncached_firmwar
}
rc = request_firmware(&bp->mips_firmware, mips_fw_file, &bp->pdev->dev);
@ -1245,7 +1243,7 @@ upstream submission.
if (bp->mips_firmware->size < sizeof(*mips_fw) ||
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -12166,11 +12166,8 @@ static int bnx2x_init_firmware(struct bn
@@ -12258,11 +12258,8 @@ static int bnx2x_init_firmware(struct bn
BNX2X_DEV_INFO("Loading %s\n", fw_file_name);
rc = request_firmware(&bp->firmware, fw_file_name, &bp->pdev->dev);
@ -1260,9 +1258,9 @@ upstream submission.
if (rc) {
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -10572,11 +10572,8 @@ static int tg3_request_firmware(struct t
@@ -10997,11 +10997,8 @@ static int tg3_request_firmware(struct t
{
const __be32 *fw_data;
const struct tg3_firmware_hdr *fw_hdr;
- if (request_firmware(&tp->fw, tp->fw_needed, &tp->pdev->dev)) {
- netdev_err(tp->dev, "Failed to load firmware \"%s\"\n",
@ -1271,7 +1269,7 @@ upstream submission.
return -ENOENT;
- }
fw_data = (void *)tp->fw->data;
fw_hdr = (struct tg3_firmware_hdr *)tp->fw->data;
--- a/drivers/net/ethernet/brocade/bna/cna_fwimg.c
+++ b/drivers/net/ethernet/brocade/bna/cna_fwimg.c
@ -1331,13 +1329,13 @@ upstream submission.
if (ret)
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -1008,11 +1008,8 @@ static int upgrade_fw(struct adapter *ad
struct device *dev = adap->pdev_dev;
@@ -1089,11 +1089,8 @@ static int upgrade_fw(struct adapter *ad
}
ret = request_firmware(&fw, FW_FNAME, dev);
ret = request_firmware(&fw, fw_file_name, dev);
- if (ret < 0) {
- dev_err(dev, "unable to load firmware image " FW_FNAME
- ", error %d\n", ret);
- dev_err(dev, "unable to load firmware image %s, error %d\n",
- fw_file_name, ret);
+ if (ret)
return ret;
- }
@ -1494,7 +1492,7 @@ upstream submission.
--- a/drivers/net/wireless/atmel.c
+++ b/drivers/net/wireless/atmel.c
@@ -3935,12 +3935,8 @@ static int reset_atmel_card(struct net_d
@@ -3928,12 +3928,8 @@ static int reset_atmel_card(struct net_d
strcpy(priv->firmware_id, "atmel_at76c502.bin");
}
err = request_firmware(&fw_entry, priv->firmware_id, priv->sys_dev);
@ -1548,7 +1546,7 @@ upstream submission.
hdr = (struct b43legacy_fw_header *)((*fw)->data);
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
@@ -3179,10 +3179,8 @@ static int brcmf_sdbrcm_download_code_fi
@@ -3037,10 +3037,8 @@ static int brcmf_sdbrcm_download_code_fi
ret = request_firmware(&bus->firmware, BRCMF_SDIO_FW_NAME,
&bus->sdiodev->func[2]->dev);
@ -1560,7 +1558,7 @@ upstream submission.
bus->fw_ptr = 0;
memptr = memblock = kmalloc(MEMBLOCK + BRCMF_SDALIGN, GFP_ATOMIC);
@@ -3295,10 +3293,8 @@ static int brcmf_sdbrcm_download_nvram(s
@@ -3159,10 +3157,8 @@ static int brcmf_sdbrcm_download_nvram(s
ret = request_firmware(&bus->firmware, BRCMF_SDIO_NV_NAME,
&bus->sdiodev->func[2]->dev);
@ -1574,7 +1572,7 @@ upstream submission.
--- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
@@ -376,19 +376,13 @@ static int brcms_request_fw(struct brcms
@@ -379,19 +379,13 @@ static int brcms_request_fw(struct brcms
sprintf(fw_name, "%s-%d.fw", brcms_firmwares[i],
UCODE_LOADER_API_VER);
status = request_firmware(&wl->fw.fw_bin[i], fw_name, device);
@ -1598,7 +1596,7 @@ upstream submission.
}
--- a/drivers/net/wireless/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/ipw2x00/ipw2100.c
@@ -8446,12 +8446,8 @@ static int ipw2100_get_firmware(struct i
@@ -8428,12 +8428,8 @@ static int ipw2100_get_firmware(struct i
rc = request_firmware(&fw->fw_entry, fw_name, &priv->pci_dev->dev);
@ -1681,7 +1679,7 @@ upstream submission.
adapter->firmware = firmware;
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -5497,16 +5497,12 @@ static int mwl8k_firmware_load_success(s
@@ -5524,16 +5524,12 @@ static int mwl8k_firmware_load_success(s
static void mwl8k_fw_state_machine(const struct firmware *fw, void *context)
{
struct mwl8k_priv *priv = context;
@ -1699,7 +1697,7 @@ upstream submission.
priv->fw_helper = fw;
rc = mwl8k_request_fw(priv, priv->fw_pref, &priv->fw_ucode,
true);
@@ -5541,11 +5537,8 @@ static void mwl8k_fw_state_machine(const
@@ -5568,11 +5564,8 @@ static void mwl8k_fw_state_machine(const
break;
case FW_STATE_LOADING_ALT:
@ -1712,7 +1710,7 @@ upstream submission.
priv->fw_ucode = fw;
rc = mwl8k_firmware_load_success(priv);
if (rc)
@@ -5583,10 +5576,8 @@ retry:
@@ -5610,10 +5603,8 @@ retry:
/* Ask userland hotplug daemon for the device firmware */
rc = mwl8k_request_firmware(priv, fw_image, nowait);
@ -1822,17 +1820,17 @@ upstream submission.
--- a/drivers/net/wireless/rt2x00/rt2x00firmware.c
+++ b/drivers/net/wireless/rt2x00/rt2x00firmware.c
@@ -51,10 +51,8 @@ static int rt2x00lib_request_firmware(st
INFO(rt2x00dev, "Loading firmware file '%s'.\n", fw_name);
rt2x00_info(rt2x00dev, "Loading firmware file '%s'\n", fw_name);
retval = request_firmware(&fw, fw_name, device);
- if (retval) {
- ERROR(rt2x00dev, "Failed to request Firmware.\n");
- rt2x00_err(rt2x00dev, "Failed to request Firmware\n");
+ if (retval)
return retval;
- }
if (!fw || !fw->size || !fw->data) {
ERROR(rt2x00dev, "Failed to read Firmware.\n");
rt2x00_err(rt2x00dev, "Failed to read Firmware\n");
--- a/drivers/net/wireless/rtlwifi/core.c
+++ b/drivers/net/wireless/rtlwifi/core.c
@@ -46,7 +46,6 @@ void rtl_fw_cb(const struct firmware *fi
@ -1881,7 +1879,7 @@ upstream submission.
wl1251_error("nvs size is not multiple of 32 bits: %zu",
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -723,10 +723,8 @@ static int wl12xx_fetch_firmware(struct
@@ -753,10 +753,8 @@ static int wl12xx_fetch_firmware(struct
ret = request_firmware(&fw, fw_name, wl->dev);
@ -1926,7 +1924,7 @@ upstream submission.
static inline u16 get_bcdDevice(const struct usb_device *udev)
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -4791,8 +4791,6 @@ static ushort AscInitAsc1000Driver(ASC_D
@@ -4298,8 +4298,6 @@ static ushort AscInitAsc1000Driver(ASC_D
err = request_firmware(&fw, fwname, asc_dvc->drv_ptr->dev);
if (err) {
@ -1935,7 +1933,7 @@ upstream submission.
asc_dvc->err_code |= ASC_IERR_MCODE_CHKSUM;
return err;
}
@@ -5124,8 +5122,6 @@ static int AdvInitAsc3550Driver(ADV_DVC_
@@ -4631,8 +4629,6 @@ static int AdvInitAsc3550Driver(ADV_DVC_
err = request_firmware(&fw, fwname, asc_dvc->drv_ptr->dev);
if (err) {
@ -1944,7 +1942,7 @@ upstream submission.
asc_dvc->err_code = ASC_IERR_MCODE_CHKSUM;
return err;
}
@@ -5640,8 +5636,6 @@ static int AdvInitAsc38C0800Driver(ADV_D
@@ -5147,8 +5143,6 @@ static int AdvInitAsc38C0800Driver(ADV_D
err = request_firmware(&fw, fwname, asc_dvc->drv_ptr->dev);
if (err) {
@ -1953,7 +1951,7 @@ upstream submission.
asc_dvc->err_code = ASC_IERR_MCODE_CHKSUM;
return err;
}
@@ -6142,8 +6136,6 @@ static int AdvInitAsc38C1600Driver(ADV_D
@@ -5649,8 +5643,6 @@ static int AdvInitAsc38C1600Driver(ADV_D
err = request_firmware(&fw, fwname, asc_dvc->drv_ptr->dev);
if (err) {
@ -2014,7 +2012,7 @@ upstream submission.
--- a/drivers/scsi/pm8001/pm8001_ctl.c
+++ b/drivers/scsi/pm8001/pm8001_ctl.c
@@ -502,9 +502,6 @@ static ssize_t pm8001_store_update_fw(st
@@ -542,9 +542,6 @@ static ssize_t pm8001_store_update_fw(st
pm8001_ha->dev);
if (err) {
@ -2037,7 +2035,7 @@ upstream submission.
}
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -5108,8 +5108,6 @@ qla2x00_load_risc(scsi_qla_host_t *vha,
@@ -5134,8 +5134,6 @@ qla2x00_load_risc(scsi_qla_host_t *vha,
/* Load firmware blob. */
blob = qla2x00_request_firmware(vha);
if (!blob) {
@ -2046,7 +2044,7 @@ upstream submission.
ql_log(ql_log_info, vha, 0x0084,
"Firmware images can be retrieved from: "QLA_FW_URL ".\n");
return QLA_FUNCTION_FAILED;
@@ -5210,8 +5208,6 @@ qla24xx_load_risc_blob(scsi_qla_host_t *
@@ -5236,8 +5234,6 @@ qla24xx_load_risc_blob(scsi_qla_host_t *
/* Load firmware blob. */
blob = qla2x00_request_firmware(vha);
if (!blob) {
@ -2072,7 +2070,7 @@ upstream submission.
if (qla82xx_validate_firmware_blob(vha,
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -5017,8 +5017,6 @@ qla2x00_request_firmware(scsi_qla_host_t
@@ -5204,8 +5204,6 @@ qla2x00_request_firmware(scsi_qla_host_t
goto out;
if (request_firmware(&blob->fw, blob->name, &ha->pdev->dev)) {
@ -2098,7 +2096,7 @@ upstream submission.
fw->size, fwname);
--- a/drivers/staging/comedi/drivers/usbdux.c
+++ b/drivers/staging/comedi/drivers/usbdux.c
@@ -2378,11 +2378,8 @@ static void usbdux_firmware_request_comp
@@ -2376,11 +2376,8 @@ static void usbdux_firmware_request_comp
struct usb_interface *uinterf = usbduxsub_tmp->interface;
int ret;
@ -2113,7 +2111,7 @@ upstream submission.
* we need to upload the firmware here because fw will be
--- a/drivers/staging/comedi/drivers/usbduxsigma.c
+++ b/drivers/staging/comedi/drivers/usbduxsigma.c
@@ -2364,11 +2364,8 @@ static void usbdux_firmware_request_comp
@@ -2358,11 +2358,8 @@ static void usbdux_firmware_request_comp
struct usb_interface *uinterf = usbduxsub_tmp->interface;
int ret;
@ -2191,63 +2189,60 @@ upstream submission.
errno = as102_firmware_upload(bus_adap, cmd_buf, firmware);
--- a/drivers/staging/media/go7007/go7007-driver.c
+++ b/drivers/staging/media/go7007/go7007-driver.c
@@ -96,11 +96,8 @@ static int go7007_load_encoder(struct go
int fw_len, rv = 0;
@@ -96,10 +96,8 @@ static int go7007_load_encoder(struct go
u16 intr_val, intr_data;
- if (request_firmware(&fw_entry, fw_name, go->dev)) {
- v4l2_err(go, "unable to load firmware from file "
- "\"%s\"\n", fw_name);
+ if (request_firmware(&fw_entry, fw_name, go->dev))
return -1;
- }
if (fw_entry->size < 16 || memcmp(fw_entry->data, "WISGO7007FW", 11)) {
v4l2_err(go, "file \"%s\" does not appear to be "
"go7007 firmware\n", fw_name);
if (go->boot_fw == NULL) {
- if (request_firmware(&fw_entry, fw_name, go->dev)) {
- v4l2_err(go, "unable to load firmware from file \"%s\"\n", fw_name);
+ if (request_firmware(&fw_entry, fw_name, go->dev))
return -1;
- }
if (fw_entry->size < 16 || memcmp(fw_entry->data, "WISGO7007FW", 11)) {
v4l2_err(go, "file \"%s\" does not appear to be go7007 firmware\n", fw_name);
release_firmware(fw_entry);
--- a/drivers/staging/media/go7007/go7007-fw.c
+++ b/drivers/staging/media/go7007/go7007-fw.c
@@ -1568,12 +1568,8 @@ int go7007_construct_fw_image(struct go7
@@ -1570,12 +1570,8 @@ int go7007_construct_fw_image(struct go7
default:
return -1;
}
- if (request_firmware(&fw_entry, go->board_info->firmware, go->dev)) {
- if (request_firmware(&fw_entry, GO7007_FW_NAME, go->dev)) {
- dev_err(go->dev,
- "unable to load firmware from file \"%s\"\n",
- go->board_info->firmware);
+ if (request_firmware(&fw_entry, go->board_info->firmware, go->dev))
- GO7007_FW_NAME);
+ if (request_firmware(&fw_entry, GO7007_FW_NAME, go->dev))
return -1;
- }
code = kzalloc(codespace * 2, GFP_KERNEL);
if (code == NULL)
goto fw_failed;
--- a/drivers/staging/media/go7007/s2250-loader.c
+++ b/drivers/staging/media/go7007/s2250-loader.c
@@ -98,12 +98,8 @@ static int s2250loader_probe(struct usb_
--- a/drivers/staging/media/go7007/go7007-loader.c
+++ b/drivers/staging/media/go7007/go7007-loader.c
@@ -80,11 +80,8 @@ static int go7007_loader_probe(struct us
mutex_unlock(&s2250_dev_table_mutex);
dev_info(&interface->dev, "loading firmware %s\n", fw1);
- if (request_firmware(&fw, S2250_LOADER_FIRMWARE, &usbdev->dev)) {
- if (request_firmware(&fw, fw1, &usbdev->dev)) {
- dev_err(&interface->dev,
- "s2250: unable to load firmware from file \"%s\"\n",
- S2250_LOADER_FIRMWARE);
+ if (request_firmware(&fw, S2250_LOADER_FIRMWARE, &usbdev->dev))
- "unable to load firmware from file \"%s\"\n", fw1);
+ if (request_firmware(&fw, fw1, &usbdev->dev))
goto failed2;
- }
ret = usb_cypress_load_firmware(usbdev, fw, CYPRESS_FX2);
ret = cypress_load_firmware(usbdev, fw, CYPRESS_FX2);
release_firmware(fw);
if (0 != ret) {
@@ -111,12 +107,8 @@ static int s2250loader_probe(struct usb_
goto failed2;
}
@@ -95,11 +92,8 @@ static int go7007_loader_probe(struct us
if (fw2 == NULL)
return 0;
- if (request_firmware(&fw, S2250_FIRMWARE, &usbdev->dev)) {
- if (request_firmware(&fw, fw2, &usbdev->dev)) {
- dev_err(&interface->dev,
- "s2250: unable to load firmware from file \"%s\"\n",
- S2250_FIRMWARE);
+ if (request_firmware(&fw, S2250_FIRMWARE, &usbdev->dev))
- "unable to load firmware from file \"%s\"\n", fw2);
+ if (request_firmware(&fw, fw2, &usbdev->dev))
goto failed2;
- }
ret = usb_cypress_load_firmware(usbdev, fw, CYPRESS_FX2);
ret = cypress_load_firmware(usbdev, fw, CYPRESS_FX2);
release_firmware(fw);
if (0 != ret) {
--- a/drivers/staging/media/lirc/lirc_zilog.c
@ -2287,7 +2282,7 @@ upstream submission.
usb_set_intfdata(pusb_intf, NULL);
--- a/drivers/staging/slicoss/slicoss.c
+++ b/drivers/staging/slicoss/slicoss.c
@@ -485,11 +485,8 @@ static int slic_card_download_gbrcv(stru
@@ -424,11 +424,8 @@ static int slic_card_download_gbrcv(stru
}
ret = request_firmware(&fw, file, &adapter->pcidev->dev);
@ -2300,7 +2295,7 @@ upstream submission.
rcvucodelen = *(u32 *)(fw->data + index);
index += 4;
@@ -563,11 +560,8 @@ static int slic_card_download(struct ada
@@ -502,11 +499,8 @@ static int slic_card_download(struct ada
return -ENOENT;
}
ret = request_firmware(&fw, file, &adapter->pcidev->dev);
@ -2315,7 +2310,7 @@ upstream submission.
for (i = 0; i < numsects; i++) {
--- a/drivers/staging/vt6656/firmware.c
+++ b/drivers/staging/vt6656/firmware.c
@@ -71,11 +71,8 @@ int FIRMWAREbDownload(struct vnt_private
@@ -57,11 +57,8 @@ int FIRMWAREbDownload(struct vnt_private
spin_unlock_irq(&pDevice->lock);
rc = request_firmware(&fw, FIRMWARE_NAME, dev);
@ -2331,7 +2326,7 @@ upstream submission.
if (!pBuffer)
--- a/drivers/tty/cyclades.c
+++ b/drivers/tty/cyclades.c
@@ -3526,10 +3526,8 @@ static int cyz_load_fw(struct pci_dev *p
@@ -3520,10 +3520,8 @@ static int cyz_load_fw(struct pci_dev *p
int retval;
retval = request_firmware(&fw, "cyzfirm.bin", &pdev->dev);
@ -2402,7 +2397,7 @@ upstream submission.
--- a/drivers/usb/atm/cxacru.c
+++ b/drivers/usb/atm/cxacru.c
@@ -1081,8 +1081,6 @@ static int cxacru_find_firmware(struct c
@@ -1082,8 +1082,6 @@ static int cxacru_find_firmware(struct c
return -ENOENT;
}
@ -2542,7 +2537,7 @@ upstream submission.
}
--- a/drivers/usb/serial/io_edgeport.c
+++ b/drivers/usb/serial/io_edgeport.c
@@ -305,11 +305,8 @@ static void update_edgeport_E2PROM(struc
@@ -302,11 +302,8 @@ static void update_edgeport_E2PROM(struc
response = request_ihex_firmware(&fw, fw_name,
&edge_serial->serial->dev->dev);
@ -2577,7 +2572,7 @@ upstream submission.
}
--- a/drivers/usb/serial/ti_usb_3410_5052.c
+++ b/drivers/usb/serial/ti_usb_3410_5052.c
@@ -1653,10 +1653,8 @@ static int ti_download_firmware(struct t
@@ -1570,10 +1570,8 @@ static int ti_download_firmware(struct t
}
status = request_firmware(&fw_p, buf, &dev->dev);
}
@ -2733,7 +2728,7 @@ upstream submission.
return err;
--- a/sound/pci/emu10k1/emu10k1_main.c
+++ b/sound/pci/emu10k1/emu10k1_main.c
@@ -854,10 +854,8 @@ static int snd_emu10k1_emu1010_init(stru
@@ -879,10 +879,8 @@ static int snd_emu10k1_emu1010_init(stru
}
err = request_firmware(&emu->firmware, filename, &emu->pci->dev);
@ -2747,7 +2742,7 @@ upstream submission.
}
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -3633,11 +3633,8 @@ static void azx_firmware_cb(const struct
@@ -3664,11 +3664,8 @@ static void azx_firmware_cb(const struct
struct azx *chip = card->private_data;
struct pci_dev *pci = chip->pci;
@ -2830,7 +2825,7 @@ upstream submission.
(int)fw->size, HDSP_FIRMWARE_SIZE);
--- a/sound/soc/codecs/wm2000.c
+++ b/sound/soc/codecs/wm2000.c
@@ -886,10 +886,8 @@ static int wm2000_i2c_probe(struct i2c_c
@@ -888,10 +888,8 @@ static int wm2000_i2c_probe(struct i2c_c
}
ret = request_firmware(&fw, filename, &i2c->dev);

View File

@ -1,36 +0,0 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Mon, 11 Feb 2013 00:56:24 +0000
Subject: mm: Try harder to allocate vmemmap blocks
Bug-Debian: http://bugs.debian.org/699913
Hot-adding memory on x86_64 normally requires huge page allocation.
When this is done to a VM guest, it's usually because the system is
already tight on memory, so the request tends to fail. Try to avoid
this by adding __GFP_REPEAT to the allocation flags.
Reported-and-tested-by: Bernhard Schmidt <Bernhard.Schmidt@lrz.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
mm/sparse-vmemmap.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c
index 1b7e22a..22b7e18 100644
--- a/mm/sparse-vmemmap.c
+++ b/mm/sparse-vmemmap.c
@@ -53,10 +53,12 @@ void * __meminit vmemmap_alloc_block(unsigned long size, int node)
struct page *page;
if (node_state(node, N_HIGH_MEMORY))
- page = alloc_pages_node(node,
- GFP_KERNEL | __GFP_ZERO, get_order(size));
+ page = alloc_pages_node(
+ node, GFP_KERNEL | __GFP_ZERO | __GFP_REPEAT,
+ get_order(size));
else
- page = alloc_pages(GFP_KERNEL | __GFP_ZERO,
+ page = alloc_pages(
+ GFP_KERNEL | __GFP_ZERO | __GFP_REPEAT,
get_order(size));
if (page)
return page_address(page);

View File

@ -8,11 +8,9 @@ and build failure (missing omap_musb_mailbox symbol in our kernel binary).
Removing the choice entry make things work.
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Index: linux/drivers/usb/musb/Kconfig
===================================================================
--- linux.orig/drivers/usb/musb/Kconfig 2012-12-03 20:39:49.000000000 +0100
+++ linux/drivers/usb/musb/Kconfig 2012-12-05 15:06:20.000000000 +0100
@@ -33,9 +33,6 @@ config USB_MUSB_HDRC
--- a/drivers/usb/musb/Kconfig
+++ b/drivers/usb/musb/Kconfig
@@ -27,9 +27,6 @@ config USB_MUSB_HDRC
if USB_MUSB_HDRC
@ -22,12 +20,12 @@ Index: linux/drivers/usb/musb/Kconfig
config USB_MUSB_DAVINCI
tristate "DaVinci"
depends on ARCH_DAVINCI_DMx
@@ -67,8 +64,6 @@ config USB_MUSB_UX500
@@ -62,8 +59,6 @@ config USB_MUSB_BLACKFIN
config USB_MUSB_UX500
tristate "U8500 and U5500"
depends on (ARCH_U8500 && AB8500_USB)
-endchoice
-
choice
prompt 'MUSB DMA mode'
default USB_UX500_DMA if USB_MUSB_UX500
default MUSB_PIO_ONLY if ARCH_MULTIPLATFORM

View File

@ -15,7 +15,7 @@ are available. This should trigger udev to load it.
---
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -42,6 +42,7 @@
@@ -43,6 +43,7 @@
#include <linux/reboot.h>
#include <linux/bcd.h>
#include <linux/ucs2_string.h>
@ -23,7 +23,7 @@ are available. This should trigger udev to load it.
#include <asm/setup.h>
#include <asm/efi.h>
@@ -870,6 +871,20 @@ void __init efi_late_init(void)
@@ -880,6 +881,20 @@ void __init efi_late_init(void)
efi_bgrt_init();
}
@ -44,13 +44,13 @@ are available. This should trigger udev to load it.
void __init efi_set_executable(efi_memory_desc_t *md, bool executable)
{
u64 addr, npages;
--- a/drivers/firmware/efivars.c
+++ b/drivers/firmware/efivars.c
@@ -95,6 +95,7 @@ MODULE_AUTHOR("Matt Domsch <Matt_Domsch@
--- a/drivers/firmware/efi/efivars.c
+++ b/drivers/firmware/efi/efivars.c
@@ -77,6 +77,7 @@ MODULE_AUTHOR("Matt Domsch <Matt_Domsch@
MODULE_DESCRIPTION("sysfs interface to EFI Variables");
MODULE_LICENSE("GPL");
MODULE_VERSION(EFIVARS_VERSION);
+MODULE_ALIAS("platform:efivars");
#define DUMP_NAME_LEN 52
LIST_HEAD(efivar_sysfs_list);
EXPORT_SYMBOL_GPL(efivar_sysfs_list);

View File

@ -12,9 +12,9 @@ The installer appears to report any failed request, and it is probably
not easy to detect that this particular failure is harmless. So stop
requesting the unreleased firmware.
--- a/drivers/net/wireless/iwlwifi/pcie/6000.c
+++ b/drivers/net/wireless/iwlwifi/pcie/6000.c
@@ -32,7 +32,7 @@
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -31,7 +31,7 @@
#include "dvm/commands.h" /* needed for BT for now */
/* Highest firmware API version supported */

View File

@ -8,7 +8,7 @@ are set.
--- a/Makefile
+++ b/Makefile
@@ -822,7 +822,7 @@ endif
@@ -826,7 +826,7 @@ endif
prepare2: prepare3 outputmakefile asm-generic
prepare1: prepare2 $(version_h) include/generated/utsrelease.h \
@ -17,7 +17,7 @@ are set.
$(cmd_crmodverdir)
archprepare: archheaders archscripts prepare1 scripts_basic
@@ -854,12 +854,25 @@ define filechk_version.h
@@ -858,12 +858,25 @@ define filechk_version.h
echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';)
endef
@ -43,46 +43,6 @@ are set.
PHONY += headerdep
headerdep:
$(Q)find $(srctree)/include/ -name '*.h' | xargs --max-args 1 \
--- a/arch/s390/kernel/traps.c
+++ b/arch/s390/kernel/traps.c
@@ -31,6 +31,7 @@
#include <linux/kprobes.h>
#include <linux/bug.h>
#include <linux/utsname.h>
+#include <generated/package.h>
#include <asm/uaccess.h>
#include <asm/io.h>
#include <linux/atomic.h>
@@ -179,11 +180,12 @@ static void show_last_breaking_event(str
*/
void dump_stack(void)
{
- printk("CPU: %d %s %s %.*s\n",
+ printk("CPU: %d %s %s %.*s%s\n",
task_thread_info(current)->cpu, print_tainted(),
init_utsname()->release,
(int)strcspn(init_utsname()->version, " "),
- init_utsname()->version);
+ init_utsname()->version,
+ LINUX_PACKAGE_ID);
printk("Process %s (pid: %d, task: %p, ksp: %p)\n",
current->comm, current->pid, current,
(void *) current->thread.ksp);
@@ -229,11 +231,12 @@ void show_registers(struct pt_regs *regs
void show_regs(struct pt_regs *regs)
{
- printk("CPU: %d %s %s %.*s\n",
+ printk("CPU: %d %s %s %.*s%s\n",
task_thread_info(current)->cpu, print_tainted(),
init_utsname()->release,
(int)strcspn(init_utsname()->version, " "),
- init_utsname()->version);
+ init_utsname()->version,
+ LINUX_PACKAGE_ID);
printk("Process %s (pid: %d, task: %p, ksp: %p)\n",
current->comm, current->pid, current,
(void *) current->thread.ksp);
--- a/arch/x86/um/sysrq_64.c
+++ b/arch/x86/um/sysrq_64.c
@@ -8,6 +8,7 @@
@ -105,55 +65,6 @@ are set.
printk(KERN_INFO "RIP: %04lx:[<%016lx>]\n", PT_REGS_CS(regs) & 0xffff,
PT_REGS_IP(regs));
printk(KERN_INFO "RSP: %016lx EFLAGS: %08lx\n", PT_REGS_SP(regs),
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -19,6 +19,7 @@
#include <linux/cpuidle.h>
#include <trace/events/power.h>
#include <linux/hw_breakpoint.h>
+#include <generated/package.h>
#include <asm/cpu.h>
#include <asm/apic.h>
#include <asm/syscalls.h>
@@ -135,11 +136,12 @@ void show_regs_common(void)
/* Board Name is optional */
board = dmi_get_system_info(DMI_BOARD_NAME);
- printk(KERN_DEFAULT "Pid: %d, comm: %.20s %s %s %.*s %s %s%s%s\n",
+ printk(KERN_DEFAULT "Pid: %d, comm: %.20s %s %s %.*s%s %s %s%s%s\n",
current->pid, current->comm, print_tainted(),
init_utsname()->release,
(int)strcspn(init_utsname()->version, " "),
init_utsname()->version,
+ LINUX_PACKAGE_ID,
vendor, product,
board ? "/" : "",
board ? board : "");
--- a/arch/x86/kernel/dumpstack.c
+++ b/arch/x86/kernel/dumpstack.c
@@ -15,6 +15,7 @@
#include <linux/bug.h>
#include <linux/nmi.h>
#include <linux/sysfs.h>
+#include <generated/package.h>
#include <asm/stacktrace.h>
@@ -188,11 +189,12 @@ void dump_stack(void)
unsigned long stack;
bp = stack_frame(current, NULL);
- printk("Pid: %d, comm: %.20s %s %s %.*s\n",
+ printk("Pid: %d, comm: %.20s %s %s %.*s%s\n",
current->pid, current->comm, print_tainted(),
init_utsname()->release,
(int)strcspn(init_utsname()->version, " "),
- init_utsname()->version);
+ init_utsname()->version,
+ LINUX_PACKAGE_ID);
show_trace(NULL, NULL, &stack, bp);
}
EXPORT_SYMBOL(dump_stack);
--- a/arch/ia64/kernel/process.c
+++ b/arch/ia64/kernel/process.c
@@ -30,6 +30,7 @@
@ -164,10 +75,10 @@ are set.
#include <asm/cpu.h>
#include <asm/delay.h>
@@ -113,9 +114,9 @@ show_regs (struct pt_regs *regs)
@@ -103,9 +104,9 @@ show_regs (struct pt_regs *regs)
print_modules();
printk("\nPid: %d, CPU %d, comm: %20s\n", task_pid_nr(current),
smp_processor_id(), current->comm);
printk("\n");
show_regs_print_info(KERN_DEFAULT);
- printk("psr : %016lx ifs : %016lx ip : [<%016lx>] %s (%s)\n",
+ printk("psr : %016lx ifs : %016lx ip : [<%016lx>] %s (%s%s)\n",
regs->cr_ipsr, regs->cr_ifs, ip, print_tainted(),
@ -176,31 +87,6 @@ are set.
print_symbol("ip is at %s\n", ip);
printk("unat: %016lx pfs : %016lx rsc : %016lx\n",
regs->ar_unat, regs->ar_pfs, regs->ar_rsc);
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -32,6 +32,7 @@
#include <linux/hw_breakpoint.h>
#include <linux/cpuidle.h>
#include <linux/leds.h>
+#include <generated/package.h>
#include <asm/cacheflush.h>
#include <asm/idmap.h>
@@ -278,11 +279,12 @@ void __show_regs(struct pt_regs *regs)
unsigned long flags;
char buf[64];
- printk("CPU: %d %s (%s %.*s)\n",
+ printk("CPU: %d %s (%s %.*s%s)\n",
raw_smp_processor_id(), print_tainted(),
init_utsname()->release,
(int)strcspn(init_utsname()->version, " "),
- init_utsname()->version);
+ init_utsname()->version,
+ LINUX_PACKAGE_ID);
print_symbol("PC is at %s\n", instruction_pointer(regs));
print_symbol("LR is at %s\n", regs->ARM_lr);
printk("pc : [<%08lx>] lr : [<%08lx>] psr: %08lx\n"
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -38,6 +38,7 @@
@ -211,7 +97,7 @@ are set.
#include <asm/pgtable.h>
#include <asm/uaccess.h>
@@ -643,8 +644,9 @@ void show_regs(struct pt_regs * regs)
@@ -842,8 +843,9 @@ void show_regs(struct pt_regs * regs)
printk("NIP: "REG" LR: "REG" CTR: "REG"\n",
regs->nip, regs->link, regs->ctr);
@ -223,27 +109,28 @@ are set.
printk("MSR: "REG" ", regs->msr);
printbits(regs->msr, msr_bits);
printk(" CR: %08lx XER: %08lx\n", regs->ccr, regs->xer);
--- a/arch/sh/kernel/process_32.c
+++ b/arch/sh/kernel/process_32.c
@@ -23,6 +23,7 @@
#include <linux/hw_breakpoint.h>
#include <linux/prefetch.h>
#include <linux/stackprotector.h>
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -45,6 +45,7 @@
#include <linux/poll.h>
#include <linux/irq_work.h>
#include <linux/utsname.h>
+#include <generated/package.h>
#include <asm/uaccess.h>
#include <asm/mmu_context.h>
#include <asm/fpu.h>
@@ -33,10 +34,11 @@ void show_regs(struct pt_regs * regs)
@@ -2883,11 +2884,12 @@ void __init dump_stack_set_arch_desc(con
*/
void dump_stack_print_info(const char *log_lvl)
{
printk("\n");
printk("Pid : %d, Comm: \t\t%s\n", task_pid_nr(current), current->comm);
- printk("CPU : %d \t\t%s (%s %.*s)\n\n",
+ printk("CPU : %d \t\t%s (%s %.*s%s)\n\n",
smp_processor_id(), print_tainted(), init_utsname()->release,
- printk("%sCPU: %d PID: %d Comm: %.20s %s %s %.*s\n",
+ printk("%sCPU: %d PID: %d Comm: %.20s %s %s %.*s%s\n",
log_lvl, raw_smp_processor_id(), current->pid, current->comm,
print_tainted(), init_utsname()->release,
(int)strcspn(init_utsname()->version, " "),
- init_utsname()->version);
+ init_utsname()->version,
+ LINUX_PACKAGE_ID);
print_symbol("PC is at %s\n", instruction_pointer(regs));
print_symbol("PR is at %s\n", regs->pr);
if (dump_stack_arch_desc_str[0] != '\0')
printk("%sHardware name: %s\n",

View File

@ -20,7 +20,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -364,7 +364,6 @@ static void conf(struct menu *menu)
@@ -368,7 +368,6 @@ static void conf(struct menu *menu)
switch (prop->type) {
case P_MENU:
if ((input_mode == silentoldconfig ||
@ -28,7 +28,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
input_mode == olddefconfig) &&
rootEntry != menu) {
check_conf(menu);
@@ -425,11 +424,7 @@ static void check_conf(struct menu *menu
@@ -429,11 +428,7 @@ static void check_conf(struct menu *menu
if (sym && !sym_has_value(sym)) {
if (sym_is_changable(sym) ||
(sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)) {
@ -41,7 +41,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
if (!conf_cnt++)
printf(_("*\n* Restart config...\n*\n"));
rootEntry = menu_get_parent_menu(menu);
@@ -442,6 +437,30 @@ static void check_conf(struct menu *menu
@@ -446,6 +441,30 @@ static void check_conf(struct menu *menu
check_conf(child);
}
@ -72,7 +72,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
static struct option long_opts[] = {
{"oldaskconfig", no_argument, NULL, oldaskconfig},
{"oldconfig", no_argument, NULL, oldconfig},
@@ -489,6 +508,7 @@ int main(int ac, char **av)
@@ -493,6 +512,7 @@ int main(int ac, char **av)
const char *progname = av[0];
int opt;
const char *name, *defconfig_file = NULL /* gcc uninit */;
@ -80,7 +80,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
struct stat tmpstat;
setlocale(LC_ALL, "");
@@ -651,16 +671,18 @@ int main(int ac, char **av)
@@ -666,16 +686,18 @@ int main(int ac, char **av)
input_mode = silentoldconfig;
/* fall through */
case oldconfig:
@ -120,9 +120,9 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
int conf_write(const char *name)
{
FILE *out;
@@ -1111,6 +1119,7 @@ void conf_set_all_new_symbols(enum conf_
@@ -1155,6 +1163,7 @@ void conf_set_all_new_symbols(enum conf_
for_all_symbols(i, sym) {
if (sym_has_value(sym))
if (sym_has_value(sym) || (sym->flags & SYMBOL_VALID))
continue;
+ sym->flags |= SYMBOL_NEW;
switch (sym_get_type(sym)) {

View File

@ -1,5 +1,5 @@
--- a/Documentation/ABI/testing/debugfs-aufs 1970-01-01 01:00:00.000000000 +0100
+++ b/Documentation/ABI/testing/debugfs-aufs 2013-05-09 01:36:20.741181631 +0100
+++ b/Documentation/ABI/testing/debugfs-aufs 2013-06-02 18:23:34.749538984 +0100
@@ -0,0 +1,50 @@
+What: /debug/aufs/si_<id>/
+Date: March 2009
@ -79,8 +79,8 @@
+ When the aufs mount option 'noxino' is specified, it
+ will be empty. About XINO files, see the aufs manual.
--- a/Documentation/filesystems/aufs/README 1970-01-01 01:00:00.000000000 +0100
+++ b/Documentation/filesystems/aufs/README 2013-05-12 01:53:46.851187256 +0100
@@ -0,0 +1,343 @@
+++ b/Documentation/filesystems/aufs/README 2013-06-02 18:23:34.749538984 +0100
@@ -0,0 +1,345 @@
+
+Aufs3 -- advanced multi layered unification filesystem version 3.x
+http://aufs.sf.net
@ -407,6 +407,8 @@
+Bor Ratajc made a donation (2013/4).
+Alessandro Gorreta made a donation (2013/4).
+POIRETTE Marc made a donation (2013/4).
+Alessandro Gorreta made a donation (2013/4).
+lauri kasvandik made a donation (2013/5).
+
+Thank you very much.
+Donations are always, including future donations, very important and
@ -1392,7 +1394,7 @@
+/new.
+Otherwise from /new.
--- a/fs/aufs/Kconfig 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/Kconfig 2013-05-12 01:53:46.855187256 +0100
+++ b/fs/aufs/Kconfig 2013-06-02 18:23:34.749538984 +0100
@@ -0,0 +1,202 @@
+config AUFS_FS
+ tristate "Aufs (Advanced multi layered unification filesystem) support"
@ -1705,7 +1707,7 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_H__ */
--- a/fs/aufs/branch.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/branch.c 2013-05-12 01:53:46.855187256 +0100
+++ b/fs/aufs/branch.c 2013-06-02 18:23:34.749538984 +0100
@@ -0,0 +1,1213 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -2921,7 +2923,7 @@
+ return err;
+}
--- a/fs/aufs/branch.h 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/branch.h 2013-05-09 01:36:20.741181631 +0100
+++ b/fs/aufs/branch.h 2013-06-02 18:23:34.749538984 +0100
@@ -0,0 +1,255 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -3220,8 +3222,8 @@
+
+-include ${srctree}/${src}/conf_priv.mk
--- a/fs/aufs/cpup.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/cpup.c 2013-05-12 01:53:46.855187256 +0100
@@ -0,0 +1,1220 @@
+++ b/fs/aufs/cpup.c 2013-06-02 18:23:34.749538984 +0100
@@ -0,0 +1,1228 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
+ *
@ -4015,11 +4017,14 @@
+ * testing CAP_MKNOD is for generic fs,
+ * but CAP_FSETID is for xfs only, currently.
+ */
+static int au_cpup_sio_test(struct super_block *sb, umode_t mode)
+static int au_cpup_sio_test(struct au_pin *pin, umode_t mode)
+{
+ int do_sio;
+ struct super_block *sb;
+ struct inode *h_dir;
+
+ do_sio = 0;
+ sb = au_pinned_parent(pin)->d_sb;
+ if (!au_wkq_test()
+ && (!au_sbi(sb)->si_plink_maint_pid
+ || au_plink_maint(sb, AuLock_NOPLM))) {
@ -4036,6 +4041,11 @@
+ if (!do_sio)
+ do_sio = ((mode & (S_ISUID | S_ISGID))
+ && !capable(CAP_FSETID));
+ /* this workaround may be removed in the future */
+ if (!do_sio) {
+ h_dir = au_pinned_h_dir(pin);
+ do_sio = h_dir->i_mode & S_ISVTX;
+ }
+ }
+
+ return do_sio;
@ -4055,7 +4065,7 @@
+ };
+
+ h_dentry = au_h_dptr(dentry, bsrc);
+ if (!au_cpup_sio_test(dentry->d_sb, h_dentry->d_inode->i_mode))
+ if (!au_cpup_sio_test(pin, h_dentry->d_inode->i_mode))
+ err = au_cpup_single(&basic, flags, dst_parent, pin);
+ else {
+ struct au_cpup_single_args args = {
@ -4143,7 +4153,7 @@
+ parent = dget_parent(dentry);
+ h_dir = au_h_iptr(parent->d_inode, bdst);
+ if (!au_test_h_perm_sio(h_dir, MAY_EXEC | MAY_WRITE)
+ && !au_cpup_sio_test(dentry->d_sb, dentry->d_inode->i_mode))
+ && !au_cpup_sio_test(pin, dentry->d_inode->i_mode))
+ err = au_cpup_simple(dentry, bdst, len, flags, pin);
+ else {
+ struct au_cpup_simple_args args = {
@ -4308,7 +4318,7 @@
+ }
+
+ if (!au_test_h_perm_sio(h_tmpdir, MAY_EXEC | MAY_WRITE)
+ && !au_cpup_sio_test(dentry->d_sb, dentry->d_inode->i_mode))
+ && !au_cpup_sio_test(pin, dentry->d_inode->i_mode))
+ err = au_cpup_wh(dentry, bdst, len, file, pin);
+ else {
+ struct au_cpup_wh_args args = {
@ -4443,7 +4453,7 @@
+ return err;
+}
--- a/fs/aufs/cpup.h 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/cpup.h 2013-05-09 01:36:20.741181631 +0100
+++ b/fs/aufs/cpup.h 2013-06-02 18:23:34.749538984 +0100
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -4530,7 +4540,7 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_CPUP_H__ */
--- a/fs/aufs/dbgaufs.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/dbgaufs.c 2013-05-12 01:53:46.855187256 +0100
+++ b/fs/aufs/dbgaufs.c 2013-06-02 18:23:34.749538984 +0100
@@ -0,0 +1,433 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -5361,7 +5371,7 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_DCSUB_H__ */
--- a/fs/aufs/debug.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/debug.c 2013-05-12 01:53:46.859187256 +0100
+++ b/fs/aufs/debug.c 2013-06-02 18:23:34.749538984 +0100
@@ -0,0 +1,491 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -6100,7 +6110,7 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_DEBUG_H__ */
--- a/fs/aufs/dentry.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/dentry.c 2013-05-12 01:53:46.859187256 +0100
+++ b/fs/aufs/dentry.c 2013-06-02 18:23:34.749538984 +0100
@@ -0,0 +1,1065 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -7168,7 +7178,7 @@
+ .d_release = aufs_d_release
+};
--- a/fs/aufs/dentry.h 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/dentry.h 2013-05-09 01:36:20.741181631 +0100
+++ b/fs/aufs/dentry.h 2013-06-02 18:23:34.749538984 +0100
@@ -0,0 +1,234 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -7951,7 +7961,7 @@
+ return -1;
+}
--- a/fs/aufs/dir.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/dir.c 2013-05-12 01:53:46.859187256 +0100
+++ b/fs/aufs/dir.c 2013-06-02 18:23:34.749538984 +0100
@@ -0,0 +1,630 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -8724,7 +8734,7 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_DIR_H__ */
--- a/fs/aufs/dynop.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/dynop.c 2013-05-09 01:36:20.741181631 +0100
+++ b/fs/aufs/dynop.c 2013-06-02 18:23:34.749538984 +0100
@@ -0,0 +1,379 @@
+/*
+ * Copyright (C) 2010-2013 Junjiro R. Okajima
@ -9185,7 +9195,7 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_DYNOP_H__ */
--- a/fs/aufs/export.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/export.c 2013-05-12 01:53:46.859187256 +0100
+++ b/fs/aufs/export.c 2013-06-02 18:23:34.749538984 +0100
@@ -0,0 +1,826 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -10014,8 +10024,8 @@
+ atomic_set(&sbinfo->si_xigen_next, u);
+}
--- a/fs/aufs/f_op.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/f_op.c 2013-05-12 01:53:46.863187256 +0100
@@ -0,0 +1,720 @@
+++ b/fs/aufs/f_op.c 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,721 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
+ *
@ -10038,6 +10048,7 @@
+ * file and vm operations
+ */
+
+#include <linux/aio.h>
+#include <linux/fs_stack.h>
+#include <linux/mman.h>
+#include <linux/security.h>
@ -10737,8 +10748,8 @@
+#endif
+};
--- a/fs/aufs/f_op_sp.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/f_op_sp.c 2013-05-12 01:53:46.863187256 +0100
@@ -0,0 +1,295 @@
+++ b/fs/aufs/f_op_sp.c 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,376 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
+ *
@ -10763,8 +10774,80 @@
+ * their file I/O is handled out of aufs.
+ */
+
+#include <linux/aio.h>
+#include "aufs.h"
+
+/*
+ * I don't think the size of this list grows much.
+ * so here is a very simple list implemented in order to find finfo matching a
+ * given file.
+ */
+static struct au_sphlhead au_finfo_sp = {
+ .spin = __SPIN_LOCK_INITIALIZER(au_finfo_sp.spin),
+ .head = HLIST_HEAD_INIT
+};
+
+struct au_finfo_sp {
+ struct hlist_node hlist;
+ struct file *file;
+ struct au_finfo *finfo;
+};
+
+struct au_finfo *au_fi_sp(struct file *file)
+{
+ struct au_finfo *finfo;
+ struct au_finfo_sp *sp;
+
+ finfo = NULL;
+ spin_lock(&au_finfo_sp.spin);
+ hlist_for_each_entry(sp, &au_finfo_sp.head, hlist) {
+ if (sp->file != file)
+ continue;
+ finfo = sp->finfo;
+ break;
+ }
+ spin_unlock(&au_finfo_sp.spin);
+
+ return finfo;
+}
+
+static int au_fi_sp_add(struct file *file)
+{
+ int err;
+ struct au_finfo_sp *sp;
+
+ err = -ENOMEM;
+ sp = kmalloc(sizeof(*sp), GFP_NOFS);
+ if (sp) {
+ err = 0;
+ sp->file = file;
+ sp->finfo = file->private_data;
+ spin_lock(&au_finfo_sp.spin);
+ hlist_add_head(&sp->hlist, &au_finfo_sp.head);
+ spin_unlock(&au_finfo_sp.spin);
+ }
+ return err;
+}
+
+static void au_fi_sp_del(struct file *file)
+{
+ struct au_finfo_sp *sp, *do_free;
+
+ do_free = NULL;
+ spin_lock(&au_finfo_sp.spin);
+ hlist_for_each_entry(sp, &au_finfo_sp.head, hlist) {
+ if (sp->file != file)
+ continue;
+ hlist_del(&sp->hlist);
+ do_free = sp;
+ break;
+ }
+ spin_unlock(&au_finfo_sp.spin);
+ kfree(do_free);
+}
+
+/* ---------------------------------------------------------------------- */
+
+static ssize_t aufs_aio_read_sp(struct kiocb *kio, const struct iovec *iov,
+ unsigned long nv, loff_t pos)
+{
@ -10831,6 +10914,7 @@
+ /* close this fifo in aufs */
+ err = h_file->f_op->release(inode, file); /* ignore */
+ aufs_release_nondir(inode, file); /* ignore */
+ au_fi_sp_del(file);
+ return err;
+}
+
@ -10954,6 +11038,10 @@
+ struct file *h_file;
+ struct inode *h_inode;
+
+ err = au_fi_sp_add(file);
+ if (unlikely(err))
+ goto out;
+
+ dentry = file->f_dentry;
+ AuDbg("%.*s\n", AuDLNPair(dentry));
+
@ -10966,7 +11054,7 @@
+ /* prepare h_file */
+ err = au_do_open_nondir(file, vfsub_file_flags(file));
+ if (unlikely(err))
+ goto out;
+ goto out_del;
+
+ sb = dentry->d_sb;
+ h_file = au_hf_top(file);
@ -10979,9 +11067,13 @@
+ si_noflush_read_lock(sb);
+ fi_write_lock(file);
+ di_read_lock_child(dentry, AuLock_IR);
+ if (!err)
+ if (!err) {
+ au_init_fop_sp(file);
+ goto out; /* success */
+ }
+
+out_del:
+ au_fi_sp_del(file);
+out:
+ return err;
+}
@ -11035,7 +11127,7 @@
+ return ret;
+}
--- a/fs/aufs/file.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/file.c 2013-05-12 01:53:46.863187256 +0100
+++ b/fs/aufs/file.c 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,688 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -11726,8 +11818,8 @@
+#endif /* CONFIG_AUFS_DEBUG */
+};
--- a/fs/aufs/file.h 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/file.h 2013-03-10 01:48:58.459093058 +0000
@@ -0,0 +1,298 @@
+++ b/fs/aufs/file.h 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,308 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
+ *
@ -11839,9 +11931,14 @@
+
+#ifdef CONFIG_AUFS_SP_IATTR
+/* f_op_sp.c */
+struct au_finfo *au_fi_sp(struct file *file);
+int au_special_file(umode_t mode);
+void au_init_special_fop(struct inode *inode, umode_t mode, dev_t rdev);
+#else
+static inline struct au_finfo *au_fi_sp(struct file *file)
+{
+ return NULL;
+}
+AuStubInt0(au_special_file, umode_t mode)
+static inline void au_init_special_fop(struct inode *inode, umode_t mode,
+ dev_t rdev)
@ -11874,7 +11971,12 @@
+
+static inline struct au_finfo *au_fi(struct file *file)
+{
+ return file->private_data;
+ struct au_finfo *finfo;
+
+ finfo = au_fi_sp(file);
+ if (!finfo)
+ finfo = file->private_data;
+ return finfo;
+}
+
+/* ---------------------------------------------------------------------- */
@ -12187,7 +12289,7 @@
+ return err;
+}
--- a/fs/aufs/fstype.h 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/fstype.h 2013-05-09 01:36:20.745181631 +0100
+++ b/fs/aufs/fstype.h 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,480 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -12670,7 +12772,7 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_FSTYPE_H__ */
--- a/fs/aufs/hfsnotify.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/hfsnotify.c 2013-05-04 18:39:17.031157464 +0100
+++ b/fs/aufs/hfsnotify.c 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,296 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -12969,7 +13071,7 @@
+ .init_br = au_hfsn_init_br
+};
--- a/fs/aufs/hfsplus.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/hfsplus.c 2013-05-09 01:36:20.745181631 +0100
+++ b/fs/aufs/hfsplus.c 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2010-2013 Junjiro R. Okajima
@ -13028,7 +13130,7 @@
+ }
+}
--- a/fs/aufs/hnotify.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/hnotify.c 2013-05-12 01:53:46.863187256 +0100
+++ b/fs/aufs/hnotify.c 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,712 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -13743,7 +13845,7 @@
+ au_hn_destroy_cache();
+}
--- a/fs/aufs/i_op.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/i_op.c 2013-05-12 01:53:46.863187256 +0100
+++ b/fs/aufs/i_op.c 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,1107 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -14853,7 +14955,7 @@
+ .update_time = aufs_update_time
+};
--- a/fs/aufs/i_op_add.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/i_op_add.c 2013-05-09 01:36:20.745181631 +0100
+++ b/fs/aufs/i_op_add.c 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,722 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -16058,7 +16160,7 @@
+ return err;
+}
--- a/fs/aufs/i_op_ren.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/i_op_ren.c 2013-05-09 01:36:20.745181631 +0100
+++ b/fs/aufs/i_op_ren.c 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,1053 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -17888,7 +17990,7 @@
+ return au_test_h_perm(h_inode, mask);
+}
--- a/fs/aufs/inode.h 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/inode.h 2013-05-09 01:36:20.745181631 +0100
+++ b/fs/aufs/inode.h 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,600 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -18690,7 +18792,7 @@
+#endif
+#endif
--- a/fs/aufs/loop.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/loop.c 2013-03-10 01:48:58.463093058 +0000
+++ b/fs/aufs/loop.c 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,135 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -18938,7 +19040,7 @@
+ccflags-y += -DHFSPLUS_SUPER_MAGIC=0x482b
+endif
--- a/fs/aufs/module.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/module.c 2013-05-12 01:53:46.863187256 +0100
+++ b/fs/aufs/module.c 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,203 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -19252,7 +19354,7 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_MODULE_H__ */
--- a/fs/aufs/opts.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/opts.c 2013-05-09 01:36:20.745181631 +0100
+++ b/fs/aufs/opts.c 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,1697 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -21164,7 +21266,7 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_OPTS_H__ */
--- a/fs/aufs/plink.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/plink.c 2013-05-12 01:53:46.867187257 +0100
+++ b/fs/aufs/plink.c 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,520 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -22497,7 +22599,7 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_RWSEM_H__ */
--- a/fs/aufs/sbinfo.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/sbinfo.c 2013-05-09 01:36:20.745181631 +0100
+++ b/fs/aufs/sbinfo.c 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,346 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -22846,7 +22948,7 @@
+ spin_unlock(&sbinfo->au_si_pid.tree_lock);
+}
--- a/fs/aufs/spl.h 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/spl.h 2013-05-09 01:36:20.745181631 +0100
+++ b/fs/aufs/spl.h 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,112 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -22961,7 +23063,7 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_SPL_H__ */
--- a/fs/aufs/super.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/super.c 2013-05-12 01:53:46.867187257 +0100
+++ b/fs/aufs/super.c 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,992 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -23956,7 +24058,7 @@
+ .owner = THIS_MODULE,
+};
--- a/fs/aufs/super.h 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/super.h 2013-05-09 01:36:20.745181631 +0100
+++ b/fs/aufs/super.h 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,555 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -24729,7 +24831,7 @@
+#endif /* __KERNEL__ */
+#endif /* __SYSAUFS_H__ */
--- a/fs/aufs/sysfs.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/sysfs.c 2013-05-09 01:36:20.745181631 +0100
+++ b/fs/aufs/sysfs.c 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,257 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -24989,7 +25091,7 @@
+ }
+}
--- a/fs/aufs/sysrq.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/sysrq.c 2013-05-12 01:53:46.867187257 +0100
+++ b/fs/aufs/sysrq.c 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,151 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -25143,7 +25245,7 @@
+ pr_err("err %d (ignored)\n", err);
+}
--- a/fs/aufs/vdir.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/vdir.c 2013-05-12 01:53:46.867187257 +0100
+++ b/fs/aufs/vdir.c 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,878 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -26024,7 +26126,7 @@
+ return 0;
+}
--- a/fs/aufs/vfsub.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/vfsub.c 2013-05-12 01:53:46.867187257 +0100
+++ b/fs/aufs/vfsub.c 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,769 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -26796,7 +26898,7 @@
+ return err;
+}
--- a/fs/aufs/vfsub.h 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/vfsub.h 2013-05-12 01:53:46.867187257 +0100
+++ b/fs/aufs/vfsub.h 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,294 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -27093,7 +27195,7 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_VFSUB_H__ */
--- a/fs/aufs/wbr_policy.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/wbr_policy.c 2013-05-09 01:36:20.745181631 +0100
+++ b/fs/aufs/wbr_policy.c 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,701 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -27797,7 +27899,7 @@
+ }
+};
--- a/fs/aufs/whout.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/whout.c 2013-05-12 01:53:46.871187257 +0100
+++ b/fs/aufs/whout.c 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,1022 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -28822,7 +28924,7 @@
+ }
+}
--- a/fs/aufs/whout.h 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/whout.h 2013-05-09 01:36:20.749181631 +0100
+++ b/fs/aufs/whout.h 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -28912,8 +29014,8 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_WHOUT_H__ */
--- a/fs/aufs/wkq.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/wkq.c 2013-05-04 18:39:11.239157326 +0100
@@ -0,0 +1,214 @@
+++ b/fs/aufs/wkq.c 2013-06-02 18:23:34.757538984 +0100
@@ -0,0 +1,213 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
+ *
@ -29119,8 +29221,7 @@
+ int err;
+
+ err = 0;
+ BUILD_BUG_ON(!WQ_RESCUER);
+ au_wkq = alloc_workqueue(AUFS_WKQ_NAME, !WQ_RESCUER, WQ_DFL_ACTIVE);
+ au_wkq = alloc_workqueue(AUFS_WKQ_NAME, 0, WQ_DFL_ACTIVE);
+ if (IS_ERR(au_wkq))
+ err = PTR_ERR(au_wkq);
+ else if (!au_wkq)
@ -29224,7 +29325,7 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_WKQ_H__ */
--- a/fs/aufs/xino.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/xino.c 2013-05-12 01:53:46.871187257 +0100
+++ b/fs/aufs/xino.c 2013-06-02 18:23:34.757538984 +0100
@@ -0,0 +1,1264 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -30513,7 +30614,7 @@
+
+#include <uapi/linux/aufs_type.h>
--- a/include/uapi/linux/aufs_type.h 1970-01-01 01:00:00.000000000 +0100
+++ b/include/uapi/linux/aufs_type.h 2013-05-12 01:53:46.871187257 +0100
+++ b/include/uapi/linux/aufs_type.h 2013-06-02 18:23:34.757538984 +0100
@@ -0,0 +1,235 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -30557,7 +30658,7 @@
+
+#include <linux/limits.h>
+
+#define AUFS_VERSION "3.9-20130506"
+#define AUFS_VERSION "3.x-rcN-20130520"
+
+/* todo? move this to linux-2.6.19/include/magic.h */
+#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's')

View File

@ -1,4 +1,4 @@
aufs3.9 base patch
aufs3.x-rcN base patch
diff --git a/fs/file_table.c b/fs/file_table.c
index cd4d87a..ca5948f 100644
@ -14,7 +14,7 @@ index cd4d87a..ca5948f 100644
/* SLAB cache for file structures */
static struct kmem_cache *filp_cachep __read_mostly;
diff --git a/fs/inode.c b/fs/inode.c
index a898b3d..e83cd1e 100644
index 00d5fc3..f324521 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1498,7 +1498,7 @@ static int relatime_need_update(struct vfsmount *mnt, struct inode *inode,
@ -27,10 +27,10 @@ index a898b3d..e83cd1e 100644
if (inode->i_op->update_time)
return inode->i_op->update_time(inode, time, flags);
diff --git a/fs/splice.c b/fs/splice.c
index 29e394e..7117387 100644
index e6b2559..e4082c6 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1095,8 +1095,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
@@ -1093,8 +1093,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
/*
* Attempt to initiate a splice from pipe to file.
*/
@ -41,7 +41,7 @@ index 29e394e..7117387 100644
{
ssize_t (*splice_write)(struct pipe_inode_info *, struct file *,
loff_t *, size_t, unsigned int);
@@ -1123,9 +1123,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
@@ -1124,9 +1124,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
/*
* Attempt to initiate a splice from a file to a pipe.
*/
@ -55,10 +55,10 @@ index 29e394e..7117387 100644
ssize_t (*splice_read)(struct file *, loff_t *,
struct pipe_inode_info *, size_t, unsigned int);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 2c28271..5c49108 100644
index 43db02e..59b6e6e 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2558,6 +2558,7 @@ extern int inode_change_ok(const struct inode *, struct iattr *);
@@ -2576,6 +2576,7 @@ extern int inode_change_ok(const struct inode *, struct iattr *);
extern int inode_newsize_ok(const struct inode *, loff_t offset);
extern void setattr_copy(struct inode *inode, const struct iattr *attr);

View File

@ -1,28 +1,28 @@
aufs3.9 kbuild patch
aufs3.x-rcN kbuild patch
diff --git a/fs/Kconfig b/fs/Kconfig
index 780725a..d460c05 100644
index c229f82..397b473 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -211,6 +211,7 @@ source "fs/sysv/Kconfig"
source "fs/ufs/Kconfig"
@@ -212,6 +212,7 @@ source "fs/ufs/Kconfig"
source "fs/exofs/Kconfig"
source "fs/f2fs/Kconfig"
source "fs/efivarfs/Kconfig"
+source "fs/aufs/Kconfig"
endif # MISC_FILESYSTEMS
diff --git a/fs/Makefile b/fs/Makefile
index 9d53192..e70f08f 100644
index 4fe6df3..4a57676 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -127,3 +127,4 @@ obj-$(CONFIG_F2FS_FS) += f2fs/
obj-y += exofs/ # Multiple modules
@@ -126,3 +126,4 @@ obj-y += exofs/ # Multiple modules
obj-$(CONFIG_CEPH_FS) += ceph/
obj-$(CONFIG_PSTORE) += pstore/
obj-$(CONFIG_EFIVAR_FS) += efivarfs/
+obj-$(CONFIG_AUFS_FS) += aufs/
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
index 5c8a1d2..fea7572 100644
index ab5d499..ed438c0 100644
--- a/include/uapi/linux/Kbuild
+++ b/include/uapi/linux/Kbuild
@@ -56,6 +56,7 @@ header-y += atmppp.h

View File

@ -1,4 +1,4 @@
aufs3.9 standalone patch
aufs3.x-rcN standalone patch
diff --git a/fs/file_table.c b/fs/file_table.c
index ca5948f..b553610 100644
@ -22,7 +22,7 @@ index ca5948f..b553610 100644
/*
diff --git a/fs/inode.c b/fs/inode.c
index e83cd1e..fa2245a 100644
index f324521..bff7670 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -56,6 +56,7 @@ static struct hlist_head *inode_hashtable __read_mostly;
@ -42,10 +42,10 @@ index e83cd1e..fa2245a 100644
/**
* touch_atime - update the access time
diff --git a/fs/namespace.c b/fs/namespace.c
index 341d3f5..18f5bb0 100644
index 7b1ca9b..51db6ad 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -52,6 +52,7 @@ EXPORT_SYMBOL_GPL(fs_kobj);
@@ -54,6 +54,7 @@ EXPORT_SYMBOL_GPL(fs_kobj);
* tree or hash is modified or when a vfsmount structure is modified.
*/
DEFINE_BRLOCK(vfsmount_lock);
@ -53,7 +53,7 @@ index 341d3f5..18f5bb0 100644
static inline unsigned long hash(struct vfsmount *mnt, struct dentry *dentry)
{
@@ -425,6 +426,7 @@ void __mnt_drop_write(struct vfsmount *mnt)
@@ -427,6 +428,7 @@ void __mnt_drop_write(struct vfsmount *mnt)
mnt_dec_writers(real_mount(mnt));
preempt_enable();
}
@ -61,7 +61,7 @@ index 341d3f5..18f5bb0 100644
/**
* mnt_drop_write - give up write access to a mount
@@ -1417,6 +1419,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
@@ -1456,6 +1458,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
}
return 0;
}
@ -142,7 +142,7 @@ index fc6b49b..a6bb87d 100644
static int fsnotify_mark_destroy(void *ignored)
{
diff --git a/fs/open.c b/fs/open.c
index 6835446..df2262a 100644
index 8c74100..be563cd 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -61,6 +61,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
@ -154,18 +154,18 @@ index 6835446..df2262a 100644
long vfs_truncate(struct path *path, loff_t length)
{
diff --git a/fs/splice.c b/fs/splice.c
index 7117387..af8fd2d 100644
index e4082c6..2d1a9fc 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1119,6 +1119,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
return splice_write(pipe, out, ppos, len, flags);
@@ -1120,6 +1120,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
file_end_write(out);
return ret;
}
+EXPORT_SYMBOL_GPL(do_splice_from);
/*
* Attempt to initiate a splice from a file to a pipe.
@@ -1145,6 +1146,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
@@ -1146,6 +1147,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
return splice_read(in, ppos, pipe, len, flags);
}
@ -190,7 +190,7 @@ index c44b6fe..d78b003 100644
}
+EXPORT_SYMBOL_GPL(cap_mmap_file);
diff --git a/security/device_cgroup.c b/security/device_cgroup.c
index 1c69e38..7392d19 100644
index dd0dc57..9760ecb6 100644
--- a/security/device_cgroup.c
+++ b/security/device_cgroup.c
@@ -7,6 +7,7 @@
@ -201,7 +201,7 @@ index 1c69e38..7392d19 100644
#include <linux/list.h>
#include <linux/uaccess.h>
#include <linux/seq_file.h>
@@ -634,6 +635,7 @@ int __devcgroup_inode_permission(struct inode *inode, int mask)
@@ -789,6 +790,7 @@ int __devcgroup_inode_permission(struct inode *inode, int mask)
return __devcgroup_check_permission(type, imajor(inode), iminor(inode),
access);
}
@ -210,7 +210,7 @@ index 1c69e38..7392d19 100644
int devcgroup_inode_mknod(int mode, dev_t dev)
{
diff --git a/security/security.c b/security/security.c
index 03f248b..892e803 100644
index a3dce87..06a6ea6 100644
--- a/security/security.c
+++ b/security/security.c
@@ -396,6 +396,7 @@ int security_path_rmdir(struct path *dir, struct dentry *dentry)

View File

@ -1,35 +0,0 @@
From 693a56eaf487140adbe114248e3cd22002fc867d Mon Sep 17 00:00:00 2001
From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Date: Tue, 26 Mar 2013 07:16:26 -0300
Subject: [PATCH] ARM: mvebu: Add thermal support to Armada XP device tree
This patch adds support for the thermal controller available in
all Armada XP boards. This controller has two 4-byte registers:
one to read the thermal sensor, the other for sensor initialization.
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
---
arch/arm/boot/dts/armada-xp.dtsi | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm/boot/dts/armada-xp.dtsi b/arch/arm/boot/dts/armada-xp.dtsi
index 1443949..d85fa6a 100644
--- a/arch/arm/boot/dts/armada-xp.dtsi
+++ b/arch/arm/boot/dts/armada-xp.dtsi
@@ -151,5 +151,11 @@
status = "disabled";
};
+ thermal@d00182b0 {
+ compatible = "marvell,armadaxp-thermal";
+ reg = <0xd00182b0 0x4
+ 0xd00184d0 0x4>;
+ status = "okay";
+ };
};
};
--
1.7.9.5

View File

@ -1,330 +0,0 @@
From fa0d654c84c7705d90a2492b4611e1da7ccdf69c Mon Sep 17 00:00:00 2001
From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Date: Tue, 2 Apr 2013 01:37:41 +0000
Subject: [PATCH] thermal: Add driver for Armada 370/XP SoC thermal management
This driver supports both Armada 370 and Armada XP SoC
thermal management controllers.
Armada 370 has a register to check a valid temperature, whereas
Armada XP does not. Each has a different initialization (i.e. calibration)
function. The temperature conversion formula is the same for both.
The controller present in each SoC have a very similar feature set,
so it corresponds to have one driver to support both of them.
Although this driver may present similarities to Dove and Kirkwood
thermal driver, the exact differences and coincidences are not fully
known. For this reason, support is given through a separate driver.
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
---
.../devicetree/bindings/thermal/armada-thermal.txt | 22 ++
drivers/thermal/Kconfig | 8 +
drivers/thermal/Makefile | 1 +
drivers/thermal/armada_thermal.c | 232 ++++++++++++++++++++
4 files changed, 263 insertions(+)
create mode 100644 Documentation/devicetree/bindings/thermal/armada-thermal.txt
create mode 100644 drivers/thermal/armada_thermal.c
diff --git a/Documentation/devicetree/bindings/thermal/armada-thermal.txt b/Documentation/devicetree/bindings/thermal/armada-thermal.txt
new file mode 100644
index 0000000..fff93d5
--- /dev/null
+++ b/Documentation/devicetree/bindings/thermal/armada-thermal.txt
@@ -0,0 +1,22 @@
+* Marvell Armada 370/XP thermal management
+
+Required properties:
+
+- compatible: Should be set to one of the following:
+ marvell,armada370-thermal
+ marvell,armadaxp-thermal
+
+- reg: Device's register space.
+ Two entries are expected, see the examples below.
+ The first one is required for the sensor register;
+ the second one is required for the control register
+ to be used for sensor initialization (a.k.a. calibration).
+
+Example:
+
+ thermal@d0018300 {
+ compatible = "marvell,armada370-thermal";
+ reg = <0xd0018300 0x4
+ 0xd0018304 0x4>;
+ status = "okay";
+ };
diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
index a764f16..9eddf74 100644
--- a/drivers/thermal/Kconfig
+++ b/drivers/thermal/Kconfig
@@ -144,6 +144,14 @@ config DB8500_THERMAL
created. Cooling devices can be bound to the trip points to cool this
thermal zone if trip points reached.
+config ARMADA_THERMAL
+ tristate "Armada 370/XP thermal management"
+ depends on ARCH_MVEBU
+ depends on OF
+ help
+ Enable this option if you want to have support for thermal management
+ controller present in Armada 370 and Armada XP SoC.
+
config DB8500_CPUFREQ_COOLING
tristate "DB8500 cpufreq cooling"
depends on ARCH_U8500
diff --git a/drivers/thermal/Makefile b/drivers/thermal/Makefile
index d3a2b38..7f6509a 100644
--- a/drivers/thermal/Makefile
+++ b/drivers/thermal/Makefile
@@ -19,6 +19,7 @@ obj-$(CONFIG_KIRKWOOD_THERMAL) += kirkwood_thermal.o
obj-$(CONFIG_EXYNOS_THERMAL) += exynos_thermal.o
obj-$(CONFIG_DOVE_THERMAL) += dove_thermal.o
obj-$(CONFIG_DB8500_THERMAL) += db8500_thermal.o
+obj-$(CONFIG_ARMADA_THERMAL) += armada_thermal.o
obj-$(CONFIG_DB8500_CPUFREQ_COOLING) += db8500_cpufreq_cooling.o
obj-$(CONFIG_INTEL_POWERCLAMP) += intel_powerclamp.o
diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
new file mode 100644
index 0000000..5b4d75f
--- /dev/null
+++ b/drivers/thermal/armada_thermal.c
@@ -0,0 +1,232 @@
+/*
+ * Marvell Armada 370/XP thermal sensor driver
+ *
+ * Copyright (C) 2013 Marvell
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+#include <linux/device.h>
+#include <linux/err.h>
+#include <linux/io.h>
+#include <linux/kernel.h>
+#include <linux/of.h>
+#include <linux/module.h>
+#include <linux/delay.h>
+#include <linux/platform_device.h>
+#include <linux/of_device.h>
+#include <linux/thermal.h>
+
+#define THERMAL_VALID_OFFSET 9
+#define THERMAL_VALID_MASK 0x1
+#define THERMAL_TEMP_OFFSET 10
+#define THERMAL_TEMP_MASK 0x1ff
+
+/* Thermal Manager Control and Status Register */
+#define PMU_TDC0_SW_RST_MASK (0x1 << 1)
+#define PMU_TM_DISABLE_OFFS 0
+#define PMU_TM_DISABLE_MASK (0x1 << PMU_TM_DISABLE_OFFS)
+#define PMU_TDC0_REF_CAL_CNT_OFFS 11
+#define PMU_TDC0_REF_CAL_CNT_MASK (0x1ff << PMU_TDC0_REF_CAL_CNT_OFFS)
+#define PMU_TDC0_OTF_CAL_MASK (0x1 << 30)
+#define PMU_TDC0_START_CAL_MASK (0x1 << 25)
+
+struct armada_thermal_ops;
+
+/* Marvell EBU Thermal Sensor Dev Structure */
+struct armada_thermal_priv {
+ void __iomem *sensor;
+ void __iomem *control;
+ struct armada_thermal_ops *ops;
+};
+
+struct armada_thermal_ops {
+ /* Initialize the sensor */
+ void (*init_sensor)(struct armada_thermal_priv *);
+
+ /* Test for a valid sensor value (optional) */
+ bool (*is_valid)(struct armada_thermal_priv *);
+};
+
+static void armadaxp_init_sensor(struct armada_thermal_priv *priv)
+{
+ unsigned long reg;
+
+ reg = readl_relaxed(priv->control);
+ reg |= PMU_TDC0_OTF_CAL_MASK;
+ writel(reg, priv->control);
+
+ /* Reference calibration value */
+ reg &= ~PMU_TDC0_REF_CAL_CNT_MASK;
+ reg |= (0xf1 << PMU_TDC0_REF_CAL_CNT_OFFS);
+ writel(reg, priv->control);
+
+ /* Reset the sensor */
+ reg = readl_relaxed(priv->control);
+ writel((reg | PMU_TDC0_SW_RST_MASK), priv->control);
+
+ writel(reg, priv->control);
+
+ /* Enable the sensor */
+ reg = readl_relaxed(priv->sensor);
+ reg &= ~PMU_TM_DISABLE_MASK;
+ writel(reg, priv->sensor);
+}
+
+static void armada370_init_sensor(struct armada_thermal_priv *priv)
+{
+ unsigned long reg;
+
+ reg = readl_relaxed(priv->control);
+ reg |= PMU_TDC0_OTF_CAL_MASK;
+ writel(reg, priv->control);
+
+ /* Reference calibration value */
+ reg &= ~PMU_TDC0_REF_CAL_CNT_MASK;
+ reg |= (0xf1 << PMU_TDC0_REF_CAL_CNT_OFFS);
+ writel(reg, priv->control);
+
+ reg &= ~PMU_TDC0_START_CAL_MASK;
+ writel(reg, priv->control);
+
+ mdelay(10);
+}
+
+static bool armada_is_valid(struct armada_thermal_priv *priv)
+{
+ unsigned long reg = readl_relaxed(priv->sensor);
+
+ return (reg >> THERMAL_VALID_OFFSET) & THERMAL_VALID_MASK;
+}
+
+static int armada_get_temp(struct thermal_zone_device *thermal,
+ unsigned long *temp)
+{
+ struct armada_thermal_priv *priv = thermal->devdata;
+ unsigned long reg;
+
+ /* Valid check */
+ if (priv->ops->is_valid && !priv->ops->is_valid(priv)) {
+ dev_err(&thermal->device,
+ "Temperature sensor reading not valid\n");
+ return -EIO;
+ }
+
+ reg = readl_relaxed(priv->sensor);
+ reg = (reg >> THERMAL_TEMP_OFFSET) & THERMAL_TEMP_MASK;
+ *temp = (3153000000UL - (10000000UL*reg)) / 13825;
+ return 0;
+}
+
+static struct thermal_zone_device_ops ops = {
+ .get_temp = armada_get_temp,
+};
+
+static const struct armada_thermal_ops armadaxp_ops = {
+ .init_sensor = armadaxp_init_sensor,
+};
+
+static const struct armada_thermal_ops armada370_ops = {
+ .is_valid = armada_is_valid,
+ .init_sensor = armada370_init_sensor,
+};
+
+static const struct of_device_id armada_thermal_id_table[] = {
+ {
+ .compatible = "marvell,armadaxp-thermal",
+ .data = &armadaxp_ops,
+ },
+ {
+ .compatible = "marvell,armada370-thermal",
+ .data = &armada370_ops,
+ },
+ {
+ /* sentinel */
+ },
+};
+MODULE_DEVICE_TABLE(of, armada_thermal_id_table);
+
+static int armada_thermal_probe(struct platform_device *pdev)
+{
+ struct thermal_zone_device *thermal;
+ const struct of_device_id *match;
+ struct armada_thermal_priv *priv;
+ struct resource *res;
+
+ match = of_match_device(armada_thermal_id_table, &pdev->dev);
+ if (!match)
+ return -ENODEV;
+
+ priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
+ if (!priv)
+ return -ENOMEM;
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!res) {
+ dev_err(&pdev->dev, "Failed to get platform resource\n");
+ return -ENODEV;
+ }
+
+ priv->sensor = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(priv->sensor))
+ return PTR_ERR(priv->sensor);
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
+ if (!res) {
+ dev_err(&pdev->dev, "Failed to get platform resource\n");
+ return -ENODEV;
+ }
+
+ priv->control = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(priv->control))
+ return PTR_ERR(priv->control);
+
+ priv->ops = (struct armada_thermal_ops *)match->data;
+ priv->ops->init_sensor(priv);
+
+ thermal = thermal_zone_device_register("armada_thermal", 0, 0,
+ priv, &ops, NULL, 0, 0);
+ if (IS_ERR(thermal)) {
+ dev_err(&pdev->dev,
+ "Failed to register thermal zone device\n");
+ return PTR_ERR(thermal);
+ }
+
+ platform_set_drvdata(pdev, thermal);
+
+ return 0;
+}
+
+static int armada_thermal_exit(struct platform_device *pdev)
+{
+ struct thermal_zone_device *armada_thermal =
+ platform_get_drvdata(pdev);
+
+ thermal_zone_device_unregister(armada_thermal);
+ platform_set_drvdata(pdev, NULL);
+
+ return 0;
+}
+
+static struct platform_driver armada_thermal_driver = {
+ .probe = armada_thermal_probe,
+ .remove = armada_thermal_exit,
+ .driver = {
+ .name = "armada_thermal",
+ .owner = THIS_MODULE,
+ .of_match_table = of_match_ptr(armada_thermal_id_table),
+ },
+};
+
+module_platform_driver(armada_thermal_driver);
+
+MODULE_AUTHOR("Ezequiel Garcia <ezequiel.garcia@free-electrons.com>");
+MODULE_DESCRIPTION("Armada 370/XP thermal driver");
+MODULE_LICENSE("GPL v2");
--
1.7.9.5

View File

@ -1,105 +0,0 @@
From f0c910b63cc273c239964776fae1aaa58ed4ad2b Mon Sep 17 00:00:00 2001
From: Michael Grzeschik <m.grzeschik@pengutronix.de>
Date: Sat, 30 Mar 2013 12:54:00 +0200
Subject: [PATCH] usb: chipidea: usbmisc: add mx53 support
This adds mx53 as the next user of the usbmisc driver and makes it
possible to disable the overcurrent-detection of the internal phy.
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
[Alex: fixed another set of line-too-long and void pointer cast]
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/chipidea/usbmisc_imx.c | 54 ++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c
index 08b046f..746013d 100644
--- a/drivers/usb/chipidea/usbmisc_imx.c
+++ b/drivers/usb/chipidea/usbmisc_imx.c
@@ -19,6 +19,13 @@
#define USB_DEV_MAX 4
+#define MX53_USB_OTG_PHY_CTRL_0_OFFSET 0x08
+#define MX53_USB_UH2_CTRL_OFFSET 0x14
+#define MX53_USB_UH3_CTRL_OFFSET 0x18
+#define MX53_BM_OVER_CUR_DIS_H1 BIT(5)
+#define MX53_BM_OVER_CUR_DIS_OTG BIT(8)
+#define MX53_BM_OVER_CUR_DIS_UHx BIT(30)
+
#define MX6_BM_OVER_CUR_DIS BIT(7)
struct imx_usbmisc {
@@ -52,6 +59,45 @@ static struct usbmisc_usb_device *get_usbdev(struct device *dev)
return &usbmisc->usbdev[i];
}
+static int usbmisc_imx53_init(struct device *dev)
+{
+ struct usbmisc_usb_device *usbdev;
+ void __iomem *reg = NULL;
+ unsigned long flags;
+ u32 val = 0;
+
+ usbdev = get_usbdev(dev);
+ if (IS_ERR(usbdev))
+ return PTR_ERR(usbdev);
+
+ if (usbdev->disable_oc) {
+ spin_lock_irqsave(&usbmisc->lock, flags);
+ switch (usbdev->index) {
+ case 0:
+ reg = usbmisc->base + MX53_USB_OTG_PHY_CTRL_0_OFFSET;
+ val = readl(reg) | MX53_BM_OVER_CUR_DIS_OTG;
+ break;
+ case 1:
+ reg = usbmisc->base + MX53_USB_OTG_PHY_CTRL_0_OFFSET;
+ val = readl(reg) | MX53_BM_OVER_CUR_DIS_H1;
+ break;
+ case 2:
+ reg = usbmisc->base + MX53_USB_UH2_CTRL_OFFSET;
+ val = readl(reg) | MX53_BM_OVER_CUR_DIS_UHx;
+ break;
+ case 3:
+ reg = usbmisc->base + MX53_USB_UH3_CTRL_OFFSET;
+ val = readl(reg) | MX53_BM_OVER_CUR_DIS_UHx;
+ break;
+ }
+ if (reg && val)
+ writel(val, reg);
+ spin_unlock_irqrestore(&usbmisc->lock, flags);
+ }
+
+ return 0;
+}
+
static int usbmisc_imx6q_init(struct device *dev)
{
@@ -74,12 +120,20 @@ static int usbmisc_imx6q_init(struct device *dev)
return 0;
}
+static const struct usbmisc_ops imx53_usbmisc_ops = {
+ .init = usbmisc_imx53_init,
+};
+
static const struct usbmisc_ops imx6q_usbmisc_ops = {
.init = usbmisc_imx6q_init,
};
static const struct of_device_id usbmisc_imx_dt_ids[] = {
{
+ .compatible = "fsl,imx53-usbmisc",
+ .data = &imx53_usbmisc_ops,
+ },
+ {
.compatible = "fsl,imx6q-usbmisc",
.data = &imx6q_usbmisc_ops,
},
--
1.7.9.5

View File

@ -1,168 +0,0 @@
From a068533079a0a1be53c78c89e65adfbd3c687591 Mon Sep 17 00:00:00 2001
From: Michael Grzeschik <m.grzeschik@pengutronix.de>
Date: Sat, 30 Mar 2013 12:54:01 +0200
Subject: [PATCH] usb: chipidea: usbmisc: add post handling and errata fix for
mx25
This adds a post handling routine which is called after
ci13xxx_add_device was called. The first user is the mx25, which has to
disable the external-vbus-divider after the udc has started.
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
[Alex: also fixed a signed one-bit bitfield a whitespace error and yet
another set of line-too-long and void pointer casting errors]
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
.../devicetree/bindings/usb/ci13xxx-imx.txt | 2 ++
drivers/usb/chipidea/ci13xxx_imx.c | 12 +++++++
drivers/usb/chipidea/ci13xxx_imx.h | 3 ++
drivers/usb/chipidea/usbmisc_imx.c | 36 ++++++++++++++++++++
4 files changed, 53 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt b/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt
index 5778b9c..1c04a4c 100644
--- a/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt
+++ b/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt
@@ -11,6 +11,7 @@ Optional properties:
that indicate usb controller index
- vbus-supply: regulator for vbus
- disable-over-current: disable over current detect
+- external-vbus-divider: enables off-chip resistor divider for Vbus
Examples:
usb@02184000 { /* USB OTG */
@@ -20,4 +21,5 @@ usb@02184000 { /* USB OTG */
fsl,usbphy = <&usbphy1>;
fsl,usbmisc = <&usbmisc 0>;
disable-over-current;
+ external-vbus-divider;
};
diff --git a/drivers/usb/chipidea/ci13xxx_imx.c b/drivers/usb/chipidea/ci13xxx_imx.c
index 8c29122..8faec9d 100644
--- a/drivers/usb/chipidea/ci13xxx_imx.c
+++ b/drivers/usb/chipidea/ci13xxx_imx.c
@@ -79,6 +79,9 @@ int usbmisc_get_init_data(struct device *dev, struct usbmisc_usb_device *usbdev)
if (of_find_property(np, "disable-over-current", NULL))
usbdev->disable_oc = 1;
+ if (of_find_property(np, "external-vbus-divider", NULL))
+ usbdev->evdo = 1;
+
return 0;
}
EXPORT_SYMBOL_GPL(usbmisc_get_init_data);
@@ -202,6 +205,15 @@ static int ci13xxx_imx_probe(struct platform_device *pdev)
goto err;
}
+ if (usbmisc_ops && usbmisc_ops->post) {
+ ret = usbmisc_ops->post(&pdev->dev);
+ if (ret) {
+ dev_err(&pdev->dev,
+ "usbmisc post failed, ret=%d\n", ret);
+ goto put_np;
+ }
+ }
+
data->ci_pdev = plat_ci;
platform_set_drvdata(pdev, data);
diff --git a/drivers/usb/chipidea/ci13xxx_imx.h b/drivers/usb/chipidea/ci13xxx_imx.h
index 9cd2e91..550bfa4 100644
--- a/drivers/usb/chipidea/ci13xxx_imx.h
+++ b/drivers/usb/chipidea/ci13xxx_imx.h
@@ -13,6 +13,8 @@
struct usbmisc_ops {
/* It's called once when probe a usb device */
int (*init)(struct device *dev);
+ /* It's called once after adding a usb device */
+ int (*post)(struct device *dev);
};
struct usbmisc_usb_device {
@@ -20,6 +22,7 @@ struct usbmisc_usb_device {
int index;
unsigned int disable_oc:1; /* over current detect disabled */
+ unsigned int evdo:1; /* set external vbus divider option */
};
int usbmisc_set_ops(const struct usbmisc_ops *ops);
diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c
index 746013d..714a6bd 100644
--- a/drivers/usb/chipidea/usbmisc_imx.c
+++ b/drivers/usb/chipidea/usbmisc_imx.c
@@ -14,11 +14,15 @@
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/io.h>
+#include <linux/delay.h>
#include "ci13xxx_imx.h"
#define USB_DEV_MAX 4
+#define MX25_USB_PHY_CTRL_OFFSET 0x08
+#define MX25_BM_EXTERNAL_VBUS_DIVIDER BIT(23)
+
#define MX53_USB_OTG_PHY_CTRL_0_OFFSET 0x08
#define MX53_USB_UH2_CTRL_OFFSET 0x14
#define MX53_USB_UH3_CTRL_OFFSET 0x18
@@ -59,6 +63,30 @@ static struct usbmisc_usb_device *get_usbdev(struct device *dev)
return &usbmisc->usbdev[i];
}
+static int usbmisc_imx25_post(struct device *dev)
+{
+ struct usbmisc_usb_device *usbdev;
+ void __iomem *reg;
+ unsigned long flags;
+ u32 val;
+
+ usbdev = get_usbdev(dev);
+ if (IS_ERR(usbdev))
+ return PTR_ERR(usbdev);
+
+ reg = usbmisc->base + MX25_USB_PHY_CTRL_OFFSET;
+
+ if (usbdev->evdo) {
+ spin_lock_irqsave(&usbmisc->lock, flags);
+ val = readl(reg);
+ writel(val | MX25_BM_EXTERNAL_VBUS_DIVIDER, reg);
+ spin_unlock_irqrestore(&usbmisc->lock, flags);
+ usleep_range(5000, 10000); /* needed to stabilize voltage */
+ }
+
+ return 0;
+}
+
static int usbmisc_imx53_init(struct device *dev)
{
struct usbmisc_usb_device *usbdev;
@@ -120,6 +148,10 @@ static int usbmisc_imx6q_init(struct device *dev)
return 0;
}
+static const struct usbmisc_ops imx25_usbmisc_ops = {
+ .post = usbmisc_imx25_post,
+};
+
static const struct usbmisc_ops imx53_usbmisc_ops = {
.init = usbmisc_imx53_init,
};
@@ -130,6 +162,10 @@ static const struct usbmisc_ops imx6q_usbmisc_ops = {
static const struct of_device_id usbmisc_imx_dt_ids[] = {
{
+ .compatible = "fsl,imx25-usbmisc",
+ .data = &imx25_usbmisc_ops,
+ },
+ {
.compatible = "fsl,imx53-usbmisc",
.data = &imx53_usbmisc_ops,
},
--
1.7.9.5

View File

@ -1,42 +0,0 @@
From 00b9a1f97dbdfbdc1d268bf8d878937b150ce2d4 Mon Sep 17 00:00:00 2001
From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Sat, 30 Mar 2013 12:53:58 +0200
Subject: [PATCH] usb: chipidea: usbmisc: fix a potential race condition
This fixes a potential race condition where the ci13xxx_imx glue code
could be fast enough to call one of the usbmisc_ops before he got a
valid value on the static usbmisc pointer. To fix that we first set
usbmisc, then call usbmisc_set_ops().
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/chipidea/usbmisc_imx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c
index fd4d339..d77e712 100644
--- a/drivers/usb/chipidea/usbmisc_imx.c
+++ b/drivers/usb/chipidea/usbmisc_imx.c
@@ -116,14 +116,14 @@ static int usbmisc_imx_probe(struct platform_device *pdev)
return ret;
}
+ usbmisc = data;
ret = usbmisc_set_ops(&imx6q_usbmisc_ops);
if (ret) {
+ usbmisc = NULL;
clk_disable_unprepare(data->clk);
return ret;
}
- usbmisc = data;
-
return 0;
}
--
1.7.9.5

View File

@ -1,92 +0,0 @@
From e609108a5ba70ecf3b1b6a7e09e5a56244e92926 Mon Sep 17 00:00:00 2001
From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Sat, 30 Mar 2013 12:53:59 +0200
Subject: [PATCH] usb: chipidea: usbmisc: prepare driver to handle more than
one soc
This attaches the usbmisc_ops to the of_device_id data and
makes it possible to define special functions per soc.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
[Alex: fixed one case of line-too-long and one bogus cast to void ptr]
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/chipidea/usbmisc_imx.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c
index d77e712..08b046f 100644
--- a/drivers/usb/chipidea/usbmisc_imx.c
+++ b/drivers/usb/chipidea/usbmisc_imx.c
@@ -19,13 +19,14 @@
#define USB_DEV_MAX 4
-#define BM_OVER_CUR_DIS BIT(7)
+#define MX6_BM_OVER_CUR_DIS BIT(7)
struct imx_usbmisc {
void __iomem *base;
spinlock_t lock;
struct clk *clk;
struct usbmisc_usb_device usbdev[USB_DEV_MAX];
+ const struct usbmisc_ops *ops;
};
static struct imx_usbmisc *usbmisc;
@@ -65,7 +66,7 @@ static int usbmisc_imx6q_init(struct device *dev)
if (usbdev->disable_oc) {
spin_lock_irqsave(&usbmisc->lock, flags);
reg = readl(usbmisc->base + usbdev->index * 4);
- writel(reg | BM_OVER_CUR_DIS,
+ writel(reg | MX6_BM_OVER_CUR_DIS,
usbmisc->base + usbdev->index * 4);
spin_unlock_irqrestore(&usbmisc->lock, flags);
}
@@ -78,7 +79,10 @@ static const struct usbmisc_ops imx6q_usbmisc_ops = {
};
static const struct of_device_id usbmisc_imx_dt_ids[] = {
- { .compatible = "fsl,imx6q-usbmisc"},
+ {
+ .compatible = "fsl,imx6q-usbmisc",
+ .data = &imx6q_usbmisc_ops,
+ },
{ /* sentinel */ }
};
@@ -87,6 +91,7 @@ static int usbmisc_imx_probe(struct platform_device *pdev)
struct resource *res;
struct imx_usbmisc *data;
int ret;
+ struct of_device_id *tmp_dev;
if (usbmisc)
return -EBUSY;
@@ -116,8 +121,11 @@ static int usbmisc_imx_probe(struct platform_device *pdev)
return ret;
}
+ tmp_dev = (struct of_device_id *)
+ of_match_device(usbmisc_imx_dt_ids, &pdev->dev);
+ data->ops = (const struct usbmisc_ops *)tmp_dev->data;
usbmisc = data;
- ret = usbmisc_set_ops(&imx6q_usbmisc_ops);
+ ret = usbmisc_set_ops(data->ops);
if (ret) {
usbmisc = NULL;
clk_disable_unprepare(data->clk);
@@ -129,7 +137,7 @@ static int usbmisc_imx_probe(struct platform_device *pdev)
static int usbmisc_imx_remove(struct platform_device *pdev)
{
- usbmisc_unset_ops(&imx6q_usbmisc_ops);
+ usbmisc_unset_ops(usbmisc->ops);
clk_disable_unprepare(usbmisc->clk);
usbmisc = NULL;
return 0;
--
1.7.9.5

View File

@ -1,368 +0,0 @@
From a7bc2fdf003c55f8e00e1e7e6fff51a4876779ef Mon Sep 17 00:00:00 2001
From: Michael Grzeschik <m.grzeschik@pengutronix.de>
Date: Sat, 30 Mar 2013 12:53:56 +0200
Subject: [PATCH] usb: chipidea: usbmisc: rename file, struct and functions to
usbmisc_imx
This driver will be used for every Freescale SoC which has this misc
memory layout to control the basic usb handling. So better name this
driver, function and struct names in a more generic way.
Reported-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/chipidea/Makefile | 2 +-
drivers/usb/chipidea/usbmisc_imx.c | 162 ++++++++++++++++++++++++++++++++++
drivers/usb/chipidea/usbmisc_imx6q.c | 162 ----------------------------------
3 files changed, 163 insertions(+), 163 deletions(-)
create mode 100644 drivers/usb/chipidea/usbmisc_imx.c
delete mode 100644 drivers/usb/chipidea/usbmisc_imx6q.c
Index: linux/drivers/usb/chipidea/Makefile
===================================================================
--- linux.orig/drivers/usb/chipidea/Makefile 2013-05-16 00:43:05.000000000 +0200
+++ linux/drivers/usb/chipidea/Makefile 2013-05-16 00:45:22.000000000 +0200
@@ -17,5 +17,5 @@ ifneq ($(CONFIG_PCI),)
endif
ifneq ($(CONFIG_OF_DEVICE),)
- obj-$(CONFIG_USB_CHIPIDEA) += ci13xxx_imx.o usbmisc_imx6q.o
+ obj-$(CONFIG_USB_CHIPIDEA) += ci13xxx_imx.o usbmisc_imx.o
endif
Index: linux/drivers/usb/chipidea/usbmisc_imx.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ linux/drivers/usb/chipidea/usbmisc_imx.c 2013-05-16 00:45:22.000000000 +0200
@@ -0,0 +1,162 @@
+/*
+ * Copyright 2012 Freescale Semiconductor, Inc.
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+#include <linux/module.h>
+#include <linux/of_platform.h>
+#include <linux/clk.h>
+#include <linux/err.h>
+#include <linux/io.h>
+
+#include "ci13xxx_imx.h"
+
+#define USB_DEV_MAX 4
+
+#define BM_OVER_CUR_DIS BIT(7)
+
+struct imx_usbmisc {
+ void __iomem *base;
+ spinlock_t lock;
+ struct clk *clk;
+ struct usbmisc_usb_device usbdev[USB_DEV_MAX];
+};
+
+static struct imx_usbmisc *usbmisc;
+
+static struct usbmisc_usb_device *get_usbdev(struct device *dev)
+{
+ int i, ret;
+
+ for (i = 0; i < USB_DEV_MAX; i++) {
+ if (usbmisc->usbdev[i].dev == dev)
+ return &usbmisc->usbdev[i];
+ else if (!usbmisc->usbdev[i].dev)
+ break;
+ }
+
+ if (i >= USB_DEV_MAX)
+ return ERR_PTR(-EBUSY);
+
+ ret = usbmisc_get_init_data(dev, &usbmisc->usbdev[i]);
+ if (ret)
+ return ERR_PTR(ret);
+
+ return &usbmisc->usbdev[i];
+}
+
+static int usbmisc_imx6q_init(struct device *dev)
+{
+
+ struct usbmisc_usb_device *usbdev;
+ unsigned long flags;
+ u32 reg;
+
+ usbdev = get_usbdev(dev);
+ if (IS_ERR(usbdev))
+ return PTR_ERR(usbdev);
+
+ if (usbdev->disable_oc) {
+ spin_lock_irqsave(&usbmisc->lock, flags);
+ reg = readl(usbmisc->base + usbdev->index * 4);
+ writel(reg | BM_OVER_CUR_DIS,
+ usbmisc->base + usbdev->index * 4);
+ spin_unlock_irqrestore(&usbmisc->lock, flags);
+ }
+
+ return 0;
+}
+
+static const struct usbmisc_ops imx6q_usbmisc_ops = {
+ .init = usbmisc_imx6q_init,
+};
+
+static const struct of_device_id usbmisc_imx_dt_ids[] = {
+ { .compatible = "fsl,imx6q-usbmisc"},
+ { /* sentinel */ }
+};
+
+static int usbmisc_imx_probe(struct platform_device *pdev)
+{
+ struct resource *res;
+ struct imx_usbmisc *data;
+ int ret;
+
+ if (usbmisc)
+ return -EBUSY;
+
+ data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
+ if (!data)
+ return -ENOMEM;
+
+ spin_lock_init(&data->lock);
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ data->base = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(data->base))
+ return PTR_ERR(data->base);
+
+ data->clk = devm_clk_get(&pdev->dev, NULL);
+ if (IS_ERR(data->clk)) {
+ dev_err(&pdev->dev,
+ "failed to get clock, err=%ld\n", PTR_ERR(data->clk));
+ return PTR_ERR(data->clk);
+ }
+
+ ret = clk_prepare_enable(data->clk);
+ if (ret) {
+ dev_err(&pdev->dev,
+ "clk_prepare_enable failed, err=%d\n", ret);
+ return ret;
+ }
+
+ ret = usbmisc_set_ops(&imx6q_usbmisc_ops);
+ if (ret) {
+ clk_disable_unprepare(data->clk);
+ return ret;
+ }
+
+ usbmisc = data;
+
+ return 0;
+}
+
+static int usbmisc_imx_remove(struct platform_device *pdev)
+{
+ usbmisc_unset_ops(&imx6q_usbmisc_ops);
+ clk_disable_unprepare(usbmisc->clk);
+ return 0;
+}
+
+static struct platform_driver usbmisc_imx_driver = {
+ .probe = usbmisc_imx_probe,
+ .remove = usbmisc_imx_remove,
+ .driver = {
+ .name = "usbmisc_imx",
+ .owner = THIS_MODULE,
+ .of_match_table = usbmisc_imx_dt_ids,
+ },
+};
+
+int usbmisc_imx_drv_init(void)
+{
+ return platform_driver_register(&usbmisc_imx_driver);
+}
+subsys_initcall(usbmisc_imx_drv_init);
+
+void usbmisc_imx_drv_exit(void)
+{
+ platform_driver_unregister(&usbmisc_imx_driver);
+}
+module_exit(usbmisc_imx_drv_exit);
+
+MODULE_ALIAS("platform:usbmisc-imx");
+MODULE_LICENSE("GPL v2");
+MODULE_DESCRIPTION("driver for imx usb non-core registers");
+MODULE_AUTHOR("Richard Zhao <richard.zhao@freescale.com>");
Index: linux/drivers/usb/chipidea/usbmisc_imx6q.c
===================================================================
--- linux.orig/drivers/usb/chipidea/usbmisc_imx6q.c 2013-05-16 00:45:18.000000000 +0200
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,162 +0,0 @@
-/*
- * Copyright 2012 Freescale Semiconductor, Inc.
- *
- * The code contained herein is licensed under the GNU General Public
- * License. You may obtain a copy of the GNU General Public License
- * Version 2 or later at the following locations:
- *
- * http://www.opensource.org/licenses/gpl-license.html
- * http://www.gnu.org/copyleft/gpl.html
- */
-
-#include <linux/module.h>
-#include <linux/of_platform.h>
-#include <linux/clk.h>
-#include <linux/err.h>
-#include <linux/io.h>
-
-#include "ci13xxx_imx.h"
-
-#define USB_DEV_MAX 4
-
-#define BM_OVER_CUR_DIS BIT(7)
-
-struct imx6q_usbmisc {
- void __iomem *base;
- spinlock_t lock;
- struct clk *clk;
- struct usbmisc_usb_device usbdev[USB_DEV_MAX];
-};
-
-static struct imx6q_usbmisc *usbmisc;
-
-static struct usbmisc_usb_device *get_usbdev(struct device *dev)
-{
- int i, ret;
-
- for (i = 0; i < USB_DEV_MAX; i++) {
- if (usbmisc->usbdev[i].dev == dev)
- return &usbmisc->usbdev[i];
- else if (!usbmisc->usbdev[i].dev)
- break;
- }
-
- if (i >= USB_DEV_MAX)
- return ERR_PTR(-EBUSY);
-
- ret = usbmisc_get_init_data(dev, &usbmisc->usbdev[i]);
- if (ret)
- return ERR_PTR(ret);
-
- return &usbmisc->usbdev[i];
-}
-
-static int usbmisc_imx6q_init(struct device *dev)
-{
-
- struct usbmisc_usb_device *usbdev;
- unsigned long flags;
- u32 reg;
-
- usbdev = get_usbdev(dev);
- if (IS_ERR(usbdev))
- return PTR_ERR(usbdev);
-
- if (usbdev->disable_oc) {
- spin_lock_irqsave(&usbmisc->lock, flags);
- reg = readl(usbmisc->base + usbdev->index * 4);
- writel(reg | BM_OVER_CUR_DIS,
- usbmisc->base + usbdev->index * 4);
- spin_unlock_irqrestore(&usbmisc->lock, flags);
- }
-
- return 0;
-}
-
-static const struct usbmisc_ops imx6q_usbmisc_ops = {
- .init = usbmisc_imx6q_init,
-};
-
-static const struct of_device_id usbmisc_imx6q_dt_ids[] = {
- { .compatible = "fsl,imx6q-usbmisc"},
- { /* sentinel */ }
-};
-
-static int usbmisc_imx6q_probe(struct platform_device *pdev)
-{
- struct resource *res;
- struct imx6q_usbmisc *data;
- int ret;
-
- if (usbmisc)
- return -EBUSY;
-
- data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
- if (!data)
- return -ENOMEM;
-
- spin_lock_init(&data->lock);
-
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- data->base = devm_ioremap_resource(&pdev->dev, res);
- if (IS_ERR(data->base))
- return PTR_ERR(data->base);
-
- data->clk = devm_clk_get(&pdev->dev, NULL);
- if (IS_ERR(data->clk)) {
- dev_err(&pdev->dev,
- "failed to get clock, err=%ld\n", PTR_ERR(data->clk));
- return PTR_ERR(data->clk);
- }
-
- ret = clk_prepare_enable(data->clk);
- if (ret) {
- dev_err(&pdev->dev,
- "clk_prepare_enable failed, err=%d\n", ret);
- return ret;
- }
-
- ret = usbmisc_set_ops(&imx6q_usbmisc_ops);
- if (ret) {
- clk_disable_unprepare(data->clk);
- return ret;
- }
-
- usbmisc = data;
-
- return 0;
-}
-
-static int usbmisc_imx6q_remove(struct platform_device *pdev)
-{
- usbmisc_unset_ops(&imx6q_usbmisc_ops);
- clk_disable_unprepare(usbmisc->clk);
- return 0;
-}
-
-static struct platform_driver usbmisc_imx6q_driver = {
- .probe = usbmisc_imx6q_probe,
- .remove = usbmisc_imx6q_remove,
- .driver = {
- .name = "usbmisc_imx6q",
- .owner = THIS_MODULE,
- .of_match_table = usbmisc_imx6q_dt_ids,
- },
-};
-
-int __init usbmisc_imx6q_drv_init(void)
-{
- return platform_driver_register(&usbmisc_imx6q_driver);
-}
-subsys_initcall(usbmisc_imx6q_drv_init);
-
-void __exit usbmisc_imx6q_drv_exit(void)
-{
- platform_driver_unregister(&usbmisc_imx6q_driver);
-}
-module_exit(usbmisc_imx6q_drv_exit);
-
-MODULE_ALIAS("platform:usbmisc-imx6q");
-MODULE_LICENSE("GPL v2");
-MODULE_DESCRIPTION("driver for imx6q usb non-core registers");
-MODULE_AUTHOR("Richard Zhao <richard.zhao@freescale.com>");

View File

@ -1,32 +0,0 @@
From d48a24dbc0d3f21cbd594bcc2553d40cc5ed4fd9 Mon Sep 17 00:00:00 2001
From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Sat, 30 Mar 2013 12:53:57 +0200
Subject: [PATCH] usb: chipidea: usbmisc: unset global varibale usbmisc on
driver remove
The probe function checks usbmisc to be NULL in the beginning. Without
this patch the can only be loaded once.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/chipidea/usbmisc_imx.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c
index 3c42446..fd4d339 100644
--- a/drivers/usb/chipidea/usbmisc_imx.c
+++ b/drivers/usb/chipidea/usbmisc_imx.c
@@ -131,6 +131,7 @@ static int usbmisc_imx_remove(struct platform_device *pdev)
{
usbmisc_unset_ops(&imx6q_usbmisc_ops);
clk_disable_unprepare(usbmisc->clk);
+ usbmisc = NULL;
return 0;
}
--
1.7.9.5

View File

@ -1,38 +0,0 @@
From 1f0972f5b05a674d73e4eb314fa1b6c78e37aef1 Mon Sep 17 00:00:00 2001
From: Roger Quadros <rogerq@ti.com>
Date: Tue, 12 Mar 2013 13:24:19 +0200
Subject: [PATCH] usb: phy: nop: Add some parameters to platform data
Add clk_rate parameter to platform data. If supplied, the
NOP phy driver will program the clock to that rate during probe.
Also add 2 flags, needs_vcc and needs_reset.
If the flag is set and the regulator couldn't be found
then the driver will bail out with -EPROBE_DEFER.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
include/linux/usb/nop-usb-xceiv.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/linux/usb/nop-usb-xceiv.h b/include/linux/usb/nop-usb-xceiv.h
index 28884c7..148d351 100644
--- a/include/linux/usb/nop-usb-xceiv.h
+++ b/include/linux/usb/nop-usb-xceiv.h
@@ -5,6 +5,11 @@
struct nop_usb_xceiv_platform_data {
enum usb_phy_type type;
+ unsigned long clk_rate;
+
+ /* if set fails with -EPROBE_DEFER if can't get regulator */
+ unsigned int needs_vcc:1;
+ unsigned int needs_reset:1;
};
#if defined(CONFIG_NOP_USB_XCEIV) || (defined(CONFIG_NOP_USB_XCEIV_MODULE) && defined(MODULE))
--
1.7.9.5

View File

@ -1,127 +0,0 @@
From 2319fb88e16e56c64d4f3ab50af69ed6dadbc7b5 Mon Sep 17 00:00:00 2001
From: Roger Quadros <rogerq@ti.com>
Date: Tue, 12 Mar 2013 13:24:21 +0200
Subject: [PATCH 1/6] usb: phy: nop: Manage PHY clock
If the PHY has a clock associated to it then manage the clock.
We just enable the clock in .init() and disable it in .shutdown().
Add clk_rate parameter in platform data and configure the
clock rate during probe if supplied.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
drivers/usb/otg/nop-usb-xceiv.c | 54 ++++++++++++++++++++++++++++++++++++++-
1 file changed, 53 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/otg/nop-usb-xceiv.c b/drivers/usb/otg/nop-usb-xceiv.c
index af52870..17c174f 100644
--- a/drivers/usb/otg/nop-usb-xceiv.c
+++ b/drivers/usb/otg/nop-usb-xceiv.c
@@ -32,10 +32,12 @@
#include <linux/usb/otg.h>
#include <linux/usb/nop-usb-xceiv.h>
#include <linux/slab.h>
+#include <linux/clk.h>
struct nop_usb_xceiv {
struct usb_phy phy;
struct device *dev;
+ struct clk *clk;
};
static struct platform_device *pd;
@@ -64,6 +66,24 @@ static int nop_set_suspend(struct usb_phy *x, int suspend)
return 0;
}
+static int nop_init(struct usb_phy *phy)
+{
+ struct nop_usb_xceiv *nop = dev_get_drvdata(phy->dev);
+
+ if (!IS_ERR(nop->clk))
+ clk_enable(nop->clk);
+
+ return 0;
+}
+
+static void nop_shutdown(struct usb_phy *phy)
+{
+ struct nop_usb_xceiv *nop = dev_get_drvdata(phy->dev);
+
+ if (!IS_ERR(nop->clk))
+ clk_disable(nop->clk);
+}
+
static int nop_set_peripheral(struct usb_otg *otg, struct usb_gadget *gadget)
{
if (!otg)
@@ -112,10 +132,34 @@ static int nop_usb_xceiv_probe(struct platform_device *pdev)
if (pdata)
type = pdata->type;
+ nop->clk = devm_clk_get(&pdev->dev, "main_clk");
+ if (IS_ERR(nop->clk)) {
+ dev_dbg(&pdev->dev, "Can't get phy clock: %ld\n",
+ PTR_ERR(nop->clk));
+ }
+
+ if (!IS_ERR(nop->clk) && pdata && pdata->clk_rate) {
+ err = clk_set_rate(nop->clk, pdata->clk_rate);
+ if (err) {
+ dev_err(&pdev->dev, "Error setting clock rate\n");
+ return err;
+ }
+ }
+
+ if (!IS_ERR(nop->clk)) {
+ err = clk_prepare(nop->clk);
+ if (err) {
+ dev_err(&pdev->dev, "Error preparing clock\n");
+ return err;
+ }
+ }
+
nop->dev = &pdev->dev;
nop->phy.dev = nop->dev;
nop->phy.label = "nop-xceiv";
nop->phy.set_suspend = nop_set_suspend;
+ nop->phy.init = nop_init;
+ nop->phy.shutdown = nop_shutdown;
nop->phy.state = OTG_STATE_UNDEFINED;
nop->phy.otg->phy = &nop->phy;
@@ -126,7 +170,7 @@ static int nop_usb_xceiv_probe(struct platform_device *pdev)
if (err) {
dev_err(&pdev->dev, "can't register transceiver, err: %d\n",
err);
- return err;
+ goto err_add;
}
platform_set_drvdata(pdev, nop);
@@ -134,12 +178,20 @@ static int nop_usb_xceiv_probe(struct platform_device *pdev)
ATOMIC_INIT_NOTIFIER_HEAD(&nop->phy.notifier);
return 0;
+
+err_add:
+ if (!IS_ERR(nop->clk))
+ clk_unprepare(nop->clk);
+ return err;
}
static int nop_usb_xceiv_remove(struct platform_device *pdev)
{
struct nop_usb_xceiv *nop = platform_get_drvdata(pdev);
+ if (!IS_ERR(nop->clk))
+ clk_unprepare(nop->clk);
+
usb_remove_phy(&nop->phy);
platform_set_drvdata(pdev, NULL);
--
1.7.9.5

View File

@ -1,69 +0,0 @@
From e4d7dc6674efd798792adbd689986cde5422aa62 Mon Sep 17 00:00:00 2001
From: Roger Quadros <rogerq@ti.com>
Date: Tue, 12 Mar 2013 13:24:20 +0200
Subject: [PATCH] usb: phy: nop: use devm_kzalloc()
Use resource managed kzalloc.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
drivers/usb/otg/nop-usb-xceiv.c | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/drivers/usb/otg/nop-usb-xceiv.c b/drivers/usb/otg/nop-usb-xceiv.c
index a3ce24b..af52870 100644
--- a/drivers/usb/otg/nop-usb-xceiv.c
+++ b/drivers/usb/otg/nop-usb-xceiv.c
@@ -100,15 +100,14 @@ static int nop_usb_xceiv_probe(struct platform_device *pdev)
enum usb_phy_type type = USB_PHY_TYPE_USB2;
int err;
- nop = kzalloc(sizeof *nop, GFP_KERNEL);
+ nop = devm_kzalloc(&pdev->dev, sizeof(*nop), GFP_KERNEL);
if (!nop)
return -ENOMEM;
- nop->phy.otg = kzalloc(sizeof *nop->phy.otg, GFP_KERNEL);
- if (!nop->phy.otg) {
- kfree(nop);
+ nop->phy.otg = devm_kzalloc(&pdev->dev, sizeof(*nop->phy.otg),
+ GFP_KERNEL);
+ if (!nop->phy.otg)
return -ENOMEM;
- }
if (pdata)
type = pdata->type;
@@ -127,7 +126,7 @@ static int nop_usb_xceiv_probe(struct platform_device *pdev)
if (err) {
dev_err(&pdev->dev, "can't register transceiver, err: %d\n",
err);
- goto exit;
+ return err;
}
platform_set_drvdata(pdev, nop);
@@ -135,10 +134,6 @@ static int nop_usb_xceiv_probe(struct platform_device *pdev)
ATOMIC_INIT_NOTIFIER_HEAD(&nop->phy.notifier);
return 0;
-exit:
- kfree(nop->phy.otg);
- kfree(nop);
- return err;
}
static int nop_usb_xceiv_remove(struct platform_device *pdev)
@@ -148,8 +143,6 @@ static int nop_usb_xceiv_remove(struct platform_device *pdev)
usb_remove_phy(&nop->phy);
platform_set_drvdata(pdev, NULL);
- kfree(nop->phy.otg);
- kfree(nop);
return 0;
}
--
1.7.9.5

View File

@ -1,73 +0,0 @@
From 58f735fe4778d34d9d1e37bcdd59325d66a8793e Mon Sep 17 00:00:00 2001
From: Roger Quadros <rogerq@ti.com>
Date: Tue, 12 Mar 2013 13:24:22 +0200
Subject: [PATCH 2/6] usb: phy: nop: Handle power supply regulator for the PHY
We use "vcc" as the supply name for the PHY's power supply.
The power supply will be enabled during .init() and disabled
during .shutdown()
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
drivers/usb/otg/nop-usb-xceiv.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/usb/otg/nop-usb-xceiv.c b/drivers/usb/otg/nop-usb-xceiv.c
index 17c174f..fbdcfef 100644
--- a/drivers/usb/otg/nop-usb-xceiv.c
+++ b/drivers/usb/otg/nop-usb-xceiv.c
@@ -33,11 +33,13 @@
#include <linux/usb/nop-usb-xceiv.h>
#include <linux/slab.h>
#include <linux/clk.h>
+#include <linux/regulator/consumer.h>
struct nop_usb_xceiv {
struct usb_phy phy;
struct device *dev;
struct clk *clk;
+ struct regulator *vcc;
};
static struct platform_device *pd;
@@ -70,6 +72,11 @@ static int nop_init(struct usb_phy *phy)
{
struct nop_usb_xceiv *nop = dev_get_drvdata(phy->dev);
+ if (!IS_ERR(nop->vcc)) {
+ if (regulator_enable(nop->vcc))
+ dev_err(phy->dev, "Failed to enable power\n");
+ }
+
if (!IS_ERR(nop->clk))
clk_enable(nop->clk);
@@ -82,6 +89,11 @@ static void nop_shutdown(struct usb_phy *phy)
if (!IS_ERR(nop->clk))
clk_disable(nop->clk);
+
+ if (!IS_ERR(nop->vcc)) {
+ if (regulator_disable(nop->vcc))
+ dev_err(phy->dev, "Failed to disable power\n");
+ }
}
static int nop_set_peripheral(struct usb_otg *otg, struct usb_gadget *gadget)
@@ -154,6 +166,12 @@ static int nop_usb_xceiv_probe(struct platform_device *pdev)
}
}
+ nop->vcc = devm_regulator_get(&pdev->dev, "vcc");
+ if (IS_ERR(nop->vcc)) {
+ dev_dbg(&pdev->dev, "Error getting vcc regulator: %ld\n",
+ PTR_ERR(nop->vcc));
+ }
+
nop->dev = &pdev->dev;
nop->phy.dev = nop->dev;
nop->phy.label = "nop-xceiv";
--
1.7.9.5

View File

@ -1,73 +0,0 @@
From ad63ebfc3565bbdec87ee4e30e4d40d164c1d3b8 Mon Sep 17 00:00:00 2001
From: Roger Quadros <rogerq@ti.com>
Date: Tue, 12 Mar 2013 13:24:23 +0200
Subject: [PATCH 3/6] usb: phy: nop: Handle RESET for the PHY
We expect the RESET line to be modeled as a regulator with supply
name "reset". The regulator should be modeled such that enabling
the regulator brings the PHY device out of RESET and disabling the
regulator holds the device in RESET.
They PHY will be held in RESET in .shutdown() and brought out of
RESET in .init().
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
drivers/usb/otg/nop-usb-xceiv.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/drivers/usb/otg/nop-usb-xceiv.c b/drivers/usb/otg/nop-usb-xceiv.c
index fbdcfef..6efc9b7 100644
--- a/drivers/usb/otg/nop-usb-xceiv.c
+++ b/drivers/usb/otg/nop-usb-xceiv.c
@@ -40,6 +40,7 @@ struct nop_usb_xceiv {
struct device *dev;
struct clk *clk;
struct regulator *vcc;
+ struct regulator *reset;
};
static struct platform_device *pd;
@@ -80,6 +81,12 @@ static int nop_init(struct usb_phy *phy)
if (!IS_ERR(nop->clk))
clk_enable(nop->clk);
+ if (!IS_ERR(nop->reset)) {
+ /* De-assert RESET */
+ if (regulator_enable(nop->reset))
+ dev_err(phy->dev, "Failed to de-assert reset\n");
+ }
+
return 0;
}
@@ -87,6 +94,12 @@ static void nop_shutdown(struct usb_phy *phy)
{
struct nop_usb_xceiv *nop = dev_get_drvdata(phy->dev);
+ if (!IS_ERR(nop->reset)) {
+ /* Assert RESET */
+ if (regulator_disable(nop->reset))
+ dev_err(phy->dev, "Failed to assert reset\n");
+ }
+
if (!IS_ERR(nop->clk))
clk_disable(nop->clk);
@@ -172,6 +185,12 @@ static int nop_usb_xceiv_probe(struct platform_device *pdev)
PTR_ERR(nop->vcc));
}
+ nop->reset = devm_regulator_get(&pdev->dev, "reset");
+ if (IS_ERR(nop->reset)) {
+ dev_dbg(&pdev->dev, "Error getting reset regulator: %ld\n",
+ PTR_ERR(nop->reset));
+ }
+
nop->dev = &pdev->dev;
nop->phy.dev = nop->dev;
nop->phy.label = "nop-xceiv";
--
1.7.9.5

View File

@ -1,36 +0,0 @@
From 90f4232f31f087f86667da03b1a4f3c90a32cb4a Mon Sep 17 00:00:00 2001
From: Roger Quadros <rogerq@ti.com>
Date: Tue, 12 Mar 2013 13:24:24 +0200
Subject: [PATCH 4/6] usb: phy: nop: use new PHY API to register PHY
We would need to support multiple PHYs of the same type
so use the new PHY API usb_add_phy_dev() to register the PHY.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
drivers/usb/otg/nop-usb-xceiv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/otg/nop-usb-xceiv.c b/drivers/usb/otg/nop-usb-xceiv.c
index 6efc9b7..fe7a460 100644
--- a/drivers/usb/otg/nop-usb-xceiv.c
+++ b/drivers/usb/otg/nop-usb-xceiv.c
@@ -198,12 +198,13 @@ static int nop_usb_xceiv_probe(struct platform_device *pdev)
nop->phy.init = nop_init;
nop->phy.shutdown = nop_shutdown;
nop->phy.state = OTG_STATE_UNDEFINED;
+ nop->phy.type = type;
nop->phy.otg->phy = &nop->phy;
nop->phy.otg->set_host = nop_set_host;
nop->phy.otg->set_peripheral = nop_set_peripheral;
- err = usb_add_phy(&nop->phy, type);
+ err = usb_add_phy_dev(&nop->phy);
if (err) {
dev_err(&pdev->dev, "can't register transceiver, err: %d\n",
err);
--
1.7.9.5

View File

@ -1,147 +0,0 @@
From 0eba387973f521e57f00584e5e840e5328a61dda Mon Sep 17 00:00:00 2001
From: Roger Quadros <rogerq@ti.com>
Date: Tue, 12 Mar 2013 13:24:25 +0200
Subject: [PATCH 5/6] usb: phy: nop: Add device tree support and binding
information
The PHY clock, clock rate, VCC regulator and RESET regulator
can now be provided via device tree.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
.../devicetree/bindings/usb/usb-nop-xceiv.txt | 34 +++++++++++++++++++
drivers/usb/otg/nop-usb-xceiv.c | 35 +++++++++++++++-----
2 files changed, 61 insertions(+), 8 deletions(-)
create mode 100644 Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt
diff --git a/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt b/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt
new file mode 100644
index 0000000..d7e2726
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt
@@ -0,0 +1,34 @@
+USB NOP PHY
+
+Required properties:
+- compatible: should be usb-nop-xceiv
+
+Optional properties:
+- clocks: phandle to the PHY clock. Use as per Documentation/devicetree
+ /bindings/clock/clock-bindings.txt
+ This property is required if clock-frequency is specified.
+
+- clock-names: Should be "main_clk"
+
+- clock-frequency: the clock frequency (in Hz) that the PHY clock must
+ be configured to.
+
+- vcc-supply: phandle to the regulator that provides RESET to the PHY.
+
+- reset-supply: phandle to the regulator that provides power to the PHY.
+
+Example:
+
+ hsusb1_phy {
+ compatible = "usb-nop-xceiv";
+ clock-frequency = <19200000>;
+ clocks = <&osc 0>;
+ clock-names = "main_clk";
+ vcc-supply = <&hsusb1_vcc_regulator>;
+ reset-supply = <&hsusb1_reset_regulator>;
+ };
+
+hsusb1_phy is a NOP USB PHY device that gets its clock from an oscillator
+and expects that clock to be configured to 19.2MHz by the NOP PHY driver.
+hsusb1_vcc_regulator provides power to the PHY and hsusb1_reset_regulator
+controls RESET.
diff --git a/drivers/usb/otg/nop-usb-xceiv.c b/drivers/usb/otg/nop-usb-xceiv.c
index fe7a460..b26b1c2 100644
--- a/drivers/usb/otg/nop-usb-xceiv.c
+++ b/drivers/usb/otg/nop-usb-xceiv.c
@@ -34,13 +34,14 @@
#include <linux/slab.h>
#include <linux/clk.h>
#include <linux/regulator/consumer.h>
+#include <linux/of.h>
struct nop_usb_xceiv {
- struct usb_phy phy;
- struct device *dev;
- struct clk *clk;
- struct regulator *vcc;
- struct regulator *reset;
+ struct usb_phy phy;
+ struct device *dev;
+ struct clk *clk;
+ struct regulator *vcc;
+ struct regulator *reset;
};
static struct platform_device *pd;
@@ -140,10 +141,12 @@ static int nop_set_host(struct usb_otg *otg, struct usb_bus *host)
static int nop_usb_xceiv_probe(struct platform_device *pdev)
{
+ struct device *dev = &pdev->dev;
struct nop_usb_xceiv_platform_data *pdata = pdev->dev.platform_data;
struct nop_usb_xceiv *nop;
enum usb_phy_type type = USB_PHY_TYPE_USB2;
int err;
+ u32 clk_rate = 0;
nop = devm_kzalloc(&pdev->dev, sizeof(*nop), GFP_KERNEL);
if (!nop)
@@ -154,8 +157,16 @@ static int nop_usb_xceiv_probe(struct platform_device *pdev)
if (!nop->phy.otg)
return -ENOMEM;
- if (pdata)
+ if (dev->of_node) {
+ struct device_node *node = dev->of_node;
+
+ if (of_property_read_u32(node, "clock-frequency", &clk_rate))
+ clk_rate = 0;
+
+ } else if (pdata) {
type = pdata->type;
+ clk_rate = pdata->clk_rate;
+ }
nop->clk = devm_clk_get(&pdev->dev, "main_clk");
if (IS_ERR(nop->clk)) {
@@ -163,8 +174,8 @@ static int nop_usb_xceiv_probe(struct platform_device *pdev)
PTR_ERR(nop->clk));
}
- if (!IS_ERR(nop->clk) && pdata && pdata->clk_rate) {
- err = clk_set_rate(nop->clk, pdata->clk_rate);
+ if (!IS_ERR(nop->clk) && clk_rate) {
+ err = clk_set_rate(nop->clk, clk_rate);
if (err) {
dev_err(&pdev->dev, "Error setting clock rate\n");
return err;
@@ -237,12 +248,20 @@ static int nop_usb_xceiv_remove(struct platform_device *pdev)
return 0;
}
+static const struct of_device_id nop_xceiv_dt_ids[] = {
+ { .compatible = "usb-nop-xceiv" },
+ { }
+};
+
+MODULE_DEVICE_TABLE(of, nop_xceiv_dt_ids);
+
static struct platform_driver nop_usb_xceiv_driver = {
.probe = nop_usb_xceiv_probe,
.remove = nop_usb_xceiv_remove,
.driver = {
.name = "nop_usb_xceiv",
.owner = THIS_MODULE,
+ .of_match_table = of_match_ptr(nop_xceiv_dt_ids),
},
};
--
1.7.9.5

View File

@ -1,71 +0,0 @@
From b54b5f56531d9fcbb30908373ba842af4de6a26b Mon Sep 17 00:00:00 2001
From: Roger Quadros <rogerq@ti.com>
Date: Tue, 12 Mar 2013 13:24:26 +0200
Subject: [PATCH 6/6] USB: phy: nop: Defer probe if device needs VCC/RESET
Add 2 flags, needs_vcc and needs_reset to platform data.
If the flag is set and the regulator couldn't be found
then we bail out with -EPROBE_DEFER.
For device tree boot we depend on presensce of vcc-supply/
reset-supply properties to decide if we should bail out
with -EPROBE_DEFER or just continue in case the regulator
can't be found.
This is required for proper functionality in cases where the
regulator is needed but is probed later than the PHY device.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
drivers/usb/otg/nop-usb-xceiv.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/usb/otg/nop-usb-xceiv.c b/drivers/usb/otg/nop-usb-xceiv.c
index b26b1c2..2b10cc9 100644
--- a/drivers/usb/otg/nop-usb-xceiv.c
+++ b/drivers/usb/otg/nop-usb-xceiv.c
@@ -147,6 +147,8 @@ static int nop_usb_xceiv_probe(struct platform_device *pdev)
enum usb_phy_type type = USB_PHY_TYPE_USB2;
int err;
u32 clk_rate = 0;
+ bool needs_vcc = false;
+ bool needs_reset = false;
nop = devm_kzalloc(&pdev->dev, sizeof(*nop), GFP_KERNEL);
if (!nop)
@@ -163,9 +165,14 @@ static int nop_usb_xceiv_probe(struct platform_device *pdev)
if (of_property_read_u32(node, "clock-frequency", &clk_rate))
clk_rate = 0;
+ needs_vcc = of_property_read_bool(node, "vcc-supply");
+ needs_reset = of_property_read_bool(node, "reset-supply");
+
} else if (pdata) {
type = pdata->type;
clk_rate = pdata->clk_rate;
+ needs_vcc = pdata->needs_vcc;
+ needs_reset = pdata->needs_reset;
}
nop->clk = devm_clk_get(&pdev->dev, "main_clk");
@@ -194,12 +201,16 @@ static int nop_usb_xceiv_probe(struct platform_device *pdev)
if (IS_ERR(nop->vcc)) {
dev_dbg(&pdev->dev, "Error getting vcc regulator: %ld\n",
PTR_ERR(nop->vcc));
+ if (needs_vcc)
+ return -EPROBE_DEFER;
}
nop->reset = devm_regulator_get(&pdev->dev, "reset");
if (IS_ERR(nop->reset)) {
dev_dbg(&pdev->dev, "Error getting reset regulator: %ld\n",
PTR_ERR(nop->reset));
+ if (needs_reset)
+ return -EPROBE_DEFER;
}
nop->dev = &pdev->dev;
--
1.7.9.5

View File

@ -1,197 +0,0 @@
From a07cc53bf037c028e5f01419ab335de9a12f6bc4 Mon Sep 17 00:00:00 2001
From: Alan Stern <stern@rowland.harvard.edu>
Date: Tue, 12 Mar 2013 10:44:39 +0000
Subject: [PATCH 09/10] USB: EHCI: split ehci-omap out to a separate driver
This patch (as1645) converts ehci-omap over to the new "ehci-hcd is a
library" approach, so that it can coexist peacefully with other EHCI
platform drivers and can make use of the private area allocated at
the end of struct ehci_hcd.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/host/Kconfig | 2 +-
drivers/usb/host/Makefile | 1 +
drivers/usb/host/ehci-hcd.c | 6 +---
drivers/usb/host/ehci-omap.c | 76 +++++++++++++++++++-----------------------
4 files changed, 37 insertions(+), 48 deletions(-)
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 3a21c5d..11e102e 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -155,7 +155,7 @@ config USB_EHCI_MXC
Variation of ARC USB block used in some Freescale chips.
config USB_EHCI_HCD_OMAP
- bool "EHCI support for OMAP3 and later chips"
+ tristate "EHCI support for OMAP3 and later chips"
depends on USB_EHCI_HCD && ARCH_OMAP
default y
---help---
diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile
index 001fbff..56de410 100644
--- a/drivers/usb/host/Makefile
+++ b/drivers/usb/host/Makefile
@@ -27,6 +27,7 @@ obj-$(CONFIG_USB_EHCI_HCD) += ehci-hcd.o
obj-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o
obj-$(CONFIG_USB_EHCI_HCD_PLATFORM) += ehci-platform.o
obj-$(CONFIG_USB_EHCI_MXC) += ehci-mxc.o
+obj-$(CONFIG_USB_EHCI_HCD_OMAP) += ehci-omap.o
obj-$(CONFIG_USB_OXU210HP_HCD) += oxu210hp-hcd.o
obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index b416a3f..303b022 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -1252,11 +1252,6 @@ MODULE_LICENSE ("GPL");
#define PLATFORM_DRIVER ehci_hcd_sh_driver
#endif
-#ifdef CONFIG_USB_EHCI_HCD_OMAP
-#include "ehci-omap.c"
-#define PLATFORM_DRIVER ehci_hcd_omap_driver
-#endif
-
#ifdef CONFIG_PPC_PS3
#include "ehci-ps3.c"
#define PS3_SYSTEM_BUS_DRIVER ps3_ehci_driver
@@ -1346,6 +1341,7 @@ MODULE_LICENSE ("GPL");
!IS_ENABLED(CONFIG_USB_EHCI_HCD_PLATFORM) && \
!IS_ENABLED(CONFIG_USB_CHIPIDEA_HOST) && \
!IS_ENABLED(CONFIG_USB_EHCI_MXC) && \
+ !IS_ENABLED(CONFIG_USB_EHCI_HCD_OMAP) && \
!defined(PLATFORM_DRIVER) && \
!defined(PS3_SYSTEM_BUS_DRIVER) && \
!defined(OF_PLATFORM_DRIVER) && \
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 82052fa..9e85ce1 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -36,6 +36,9 @@
* - convert to use hwmod and runtime PM
*/
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/io.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/usb/ulpi.h>
@@ -43,6 +46,10 @@
#include <linux/pm_runtime.h>
#include <linux/gpio.h>
#include <linux/clk.h>
+#include <linux/usb.h>
+#include <linux/usb/hcd.h>
+
+#include "ehci.h"
#include <linux/platform_data/usb-omap.h>
@@ -57,9 +64,11 @@
#define EHCI_INSNREG05_ULPI_EXTREGADD_SHIFT 8
#define EHCI_INSNREG05_ULPI_WRDATA_SHIFT 0
-/*-------------------------------------------------------------------------*/
+#define DRIVER_DESC "OMAP-EHCI Host Controller driver"
-static const struct hc_driver ehci_omap_hc_driver;
+static const char hcd_name[] = "ehci-omap";
+
+/*-------------------------------------------------------------------------*/
static inline void ehci_write(void __iomem *base, u32 reg, u32 val)
@@ -166,6 +175,12 @@ static void disable_put_regulator(
/* configure so an HC device and id are always provided */
/* always called with process context; sleeping is OK */
+static struct hc_driver __read_mostly ehci_omap_hc_driver;
+
+static const struct ehci_driver_overrides ehci_omap_overrides __initdata = {
+ .reset = omap_ehci_init,
+};
+
/**
* ehci_hcd_omap_probe - initialize TI-based HCDs
*
@@ -323,56 +338,33 @@ static struct platform_driver ehci_hcd_omap_driver = {
/*.suspend = ehci_hcd_omap_suspend, */
/*.resume = ehci_hcd_omap_resume, */
.driver = {
- .name = "ehci-omap",
+ .name = hcd_name,
}
};
/*-------------------------------------------------------------------------*/
-static const struct hc_driver ehci_omap_hc_driver = {
- .description = hcd_name,
- .product_desc = "OMAP-EHCI Host Controller",
- .hcd_priv_size = sizeof(struct ehci_hcd),
-
- /*
- * generic hardware linkage
- */
- .irq = ehci_irq,
- .flags = HCD_MEMORY | HCD_USB2,
-
- /*
- * basic lifecycle operations
- */
- .reset = omap_ehci_init,
- .start = ehci_run,
- .stop = ehci_stop,
- .shutdown = ehci_shutdown,
-
- /*
- * managing i/o requests and associated device resources
- */
- .urb_enqueue = ehci_urb_enqueue,
- .urb_dequeue = ehci_urb_dequeue,
- .endpoint_disable = ehci_endpoint_disable,
- .endpoint_reset = ehci_endpoint_reset,
+static int __init ehci_omap_init(void)
+{
+ if (usb_disabled())
+ return -ENODEV;
- /*
- * scheduling support
- */
- .get_frame_number = ehci_get_frame,
+ pr_info("%s: " DRIVER_DESC "\n", hcd_name);
- /*
- * root hub support
- */
- .hub_status_data = ehci_hub_status_data,
- .hub_control = ehci_hub_control,
- .bus_suspend = ehci_bus_suspend,
- .bus_resume = ehci_bus_resume,
+ ehci_init_driver(&ehci_omap_hc_driver, &ehci_omap_overrides);
+ return platform_driver_register(&ehci_hcd_omap_driver);
+}
+module_init(ehci_omap_init);
- .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,
-};
+static void __exit ehci_omap_cleanup(void)
+{
+ platform_driver_unregister(&ehci_hcd_omap_driver);
+}
+module_exit(ehci_omap_cleanup);
MODULE_ALIAS("platform:ehci-omap");
MODULE_AUTHOR("Texas Instruments, Inc.");
MODULE_AUTHOR("Felipe Balbi <felipe.balbi@nokia.com>");
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE("GPL");
--
1.7.10.4

View File

@ -1,255 +0,0 @@
From 4181beaae0fbcef78287f0f2a04d150ecc7201d9 Mon Sep 17 00:00:00 2001
From: Manjunath Goudar <manjunath.goudar@linaro.org>
Date: Tue, 2 Apr 2013 16:23:59 +0000
Subject: [PATCH 10/10] USB: EHCI: make ehci-orion a separate driver
Separate the Orion host controller driver from ehci-hcd host
code into its own driver module because of following reason.
With the multiplatform changes in arm-soc tree, it becomes
possible to enable the mvebu platform (which uses
ehci-orion) at the same time as other platforms that require
a conflicting EHCI bus glue. At the moment, this results
in a warning like
drivers/usb/host/ehci-hcd.c:1297:0: warning: "PLATFORM_DRIVER" redefined [enabled by default]
drivers/usb/host/ehci-hcd.c:1277:0: note: this is the location of the previous definition
drivers/usb/host/ehci-orion.c:334:31: warning: 'ehci_orion_driver' defined but not used [-Wunused-variable]
and an ehci driver that only works on one of them.
With the infrastructure added by Alan Stern in patch 3e0232039
"USB: EHCI: prepare to make ehci-hcd a library module", we can
avoid this problem by turning a bus glue into a separate
module, as we do here for the orion bus glue.
An earlier version of this patch was included in 3.9 but caused
a regression there, which has subsequently been fixed.
While we are here, use the opportunity to disabiguate the two
Marvell EHCI controller implementations in Kconfig.
In V4 (arnd):
- Improve Kconfig text
In V3:
- More detail provided in commit message regarding this patch.
- Replaced hcd_name string "ehci-orion" into "orion-ehci".
- MODULE_LICENSE is GPL v2.
- In ehci_init_driver calling second argument passed as NULL instead of
ehci_orion_overrides because ehci_orion_overrides is removed.
In V2:
- Tegra patch related changes removed from this patch.
Signed-off-by: Manjunath Goudar <manjunath.goudar@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Jason Cooper <jason@lakedaemon.net>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/host/Kconfig | 17 ++++++++-
drivers/usb/host/Makefile | 1 +
drivers/usb/host/ehci-hcd.c | 6 +--
drivers/usb/host/ehci-orion.c | 82 ++++++++++++++++++-----------------------
4 files changed, 53 insertions(+), 53 deletions(-)
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 11e102e..539465b 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -162,6 +162,17 @@ config USB_EHCI_HCD_OMAP
Enables support for the on-chip EHCI controller on
OMAP3 and later chips.
+config USB_EHCI_HCD_ORION
+ tristate "Support for Marvell EBU on-chip EHCI USB controller"
+ depends on USB_EHCI_HCD && PLAT_ORION
+ default y
+ ---help---
+ Enables support for the on-chip EHCI controller on Marvell's
+ embedded ARM SoCs, including Orion, Kirkwood, Dove, Armada XP,
+ Armada 370. This is different from the EHCI implementation
+ on Marvell's mobile PXA and MMP SoC, see "EHCI support for
+ Marvell PXA/MMP USB controller" for those.
+
config USB_EHCI_MSM
bool "Support for MSM on-chip EHCI USB controller"
depends on USB_EHCI_HCD && ARCH_MSM
@@ -205,13 +216,17 @@ config USB_EHCI_S5P
Enable support for the S5P SOC's on-chip EHCI controller.
config USB_EHCI_MV
- bool "EHCI support for Marvell on-chip controller"
+ bool "EHCI support for Marvell PXA/MMP USB controller"
depends on USB_EHCI_HCD && (ARCH_PXA || ARCH_MMP)
select USB_EHCI_ROOT_HUB_TT
---help---
Enables support for Marvell (including PXA and MMP series) on-chip
USB SPH and OTG controller. SPH is a single port host, and it can
only be EHCI host. OTG is controller that can switch to host mode.
+ Note that this driver will not work on Marvell's other EHCI
+ controller used by the EBU-type SoCs including Orion, Kirkwood,
+ Dova, Armada 370 and Armada XP. See "Support for Marvell EBU
+ on-chip EHCI USB controller" for those.
config USB_W90X900_EHCI
bool "W90X900(W90P910) EHCI support"
diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile
index 56de410..9492f50 100644
--- a/drivers/usb/host/Makefile
+++ b/drivers/usb/host/Makefile
@@ -28,6 +28,7 @@ obj-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o
obj-$(CONFIG_USB_EHCI_HCD_PLATFORM) += ehci-platform.o
obj-$(CONFIG_USB_EHCI_MXC) += ehci-mxc.o
obj-$(CONFIG_USB_EHCI_HCD_OMAP) += ehci-omap.o
+obj-$(CONFIG_USB_EHCI_HCD_ORION) += ehci-orion.o
obj-$(CONFIG_USB_OXU210HP_HCD) += oxu210hp-hcd.o
obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 303b022..93fd382 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -1267,11 +1267,6 @@ MODULE_LICENSE ("GPL");
#define XILINX_OF_PLATFORM_DRIVER ehci_hcd_xilinx_of_driver
#endif
-#ifdef CONFIG_PLAT_ORION
-#include "ehci-orion.c"
-#define PLATFORM_DRIVER ehci_orion_driver
-#endif
-
#ifdef CONFIG_USB_W90X900_EHCI
#include "ehci-w90x900.c"
#define PLATFORM_DRIVER ehci_hcd_w90x900_driver
@@ -1342,6 +1337,7 @@ MODULE_LICENSE ("GPL");
!IS_ENABLED(CONFIG_USB_CHIPIDEA_HOST) && \
!IS_ENABLED(CONFIG_USB_EHCI_MXC) && \
!IS_ENABLED(CONFIG_USB_EHCI_HCD_OMAP) && \
+ !IS_ENABLED(CONFIG_USB_EHCI_HCD_ORION) && \
!defined(PLATFORM_DRIVER) && \
!defined(PS3_SYSTEM_BUS_DRIVER) && \
!defined(OF_PLATFORM_DRIVER) && \
diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c
index 914a3ec..e24e905 100644
--- a/drivers/usb/host/ehci-orion.c
+++ b/drivers/usb/host/ehci-orion.c
@@ -17,6 +17,12 @@
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/of_irq.h>
+#include <linux/usb.h>
+#include <linux/usb/hcd.h>
+#include <linux/io.h>
+#include <linux/dma-mapping.h>
+
+#include "ehci.h"
#define rdl(off) __raw_readl(hcd->regs + (off))
#define wrl(off, val) __raw_writel((val), hcd->regs + (off))
@@ -34,6 +40,12 @@
#define USB_PHY_IVREF_CTRL 0x440
#define USB_PHY_TST_GRP_CTRL 0x450
+#define DRIVER_DESC "EHCI orion driver"
+
+static const char hcd_name[] = "ehci-orion";
+
+static struct hc_driver __read_mostly ehci_orion_hc_driver;
+
/*
* Implement Orion USB controller specification guidelines
*/
@@ -104,51 +116,6 @@ static void orion_usb_phy_v1_setup(struct usb_hcd *hcd)
wrl(USB_MODE, 0x13);
}
-static const struct hc_driver ehci_orion_hc_driver = {
- .description = hcd_name,
- .product_desc = "Marvell Orion EHCI",
- .hcd_priv_size = sizeof(struct ehci_hcd),
-
- /*
- * generic hardware linkage
- */
- .irq = ehci_irq,
- .flags = HCD_MEMORY | HCD_USB2,
-
- /*
- * basic lifecycle operations
- */
- .reset = ehci_setup,
- .start = ehci_run,
- .stop = ehci_stop,
- .shutdown = ehci_shutdown,
-
- /*
- * managing i/o requests and associated device resources
- */
- .urb_enqueue = ehci_urb_enqueue,
- .urb_dequeue = ehci_urb_dequeue,
- .endpoint_disable = ehci_endpoint_disable,
- .endpoint_reset = ehci_endpoint_reset,
-
- /*
- * scheduling support
- */
- .get_frame_number = ehci_get_frame,
-
- /*
- * root hub support
- */
- .hub_status_data = ehci_hub_status_data,
- .hub_control = ehci_hub_control,
- .bus_suspend = ehci_bus_suspend,
- .bus_resume = ehci_bus_resume,
- .relinquish_port = ehci_relinquish_port,
- .port_handed_over = ehci_port_handed_over,
-
- .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,
-};
-
static void
ehci_orion_conf_mbus_windows(struct usb_hcd *hcd,
const struct mbus_dram_target_info *dram)
@@ -323,8 +290,6 @@ static int __exit ehci_orion_drv_remove(struct platform_device *pdev)
return 0;
}
-MODULE_ALIAS("platform:orion-ehci");
-
static const struct of_device_id ehci_orion_dt_ids[] = {
{ .compatible = "marvell,orion-ehci", },
{},
@@ -341,3 +306,26 @@ static struct platform_driver ehci_orion_driver = {
.of_match_table = of_match_ptr(ehci_orion_dt_ids),
},
};
+
+static int __init ehci_orion_init(void)
+{
+ if (usb_disabled())
+ return -ENODEV;
+
+ pr_info("%s: " DRIVER_DESC "\n", hcd_name);
+
+ ehci_init_driver(&ehci_orion_hc_driver, NULL);
+ return platform_driver_register(&ehci_orion_driver);
+}
+module_init(ehci_orion_init);
+
+static void __exit ehci_orion_cleanup(void)
+{
+ platform_driver_unregister(&ehci_orion_driver);
+}
+module_exit(ehci_orion_cleanup);
+
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_ALIAS("platform:orion-ehci");
+MODULE_AUTHOR("Tzachi Perelstein");
+MODULE_LICENSE("GPL v2");
--
1.7.10.4

View File

@ -4,6 +4,7 @@ Enable usb power pin by using a fixed regulator. With this and the usb clock
patch is making usb working on my loco.
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
[bwh: For 3.10, use macro for PIN_FUNC_ID in GPIO list]
Index: linux/arch/arm/boot/dts/imx53-qsb.dts
===================================================================
--- linux.orig/arch/arm/boot/dts/imx53-qsb.dts 2013-05-20 00:46:34.000000000 +0200
@ -25,10 +26,10 @@ Index: linux/arch/arm/boot/dts/imx53-qsb.dts
sound {
@@ -118,6 +127,7 @@
697 0x80000000 /* MX53_PAD_EIM_DA12__GPIO3_12 */
701 0x80000000 /* MX53_PAD_EIM_DA13__GPIO3_13 */
868 0x80000000 /* MX53_PAD_PATA_DA_0__GPIO7_6 */
+ 878 0x80000000 /* MX53_PAD_PATA_DA_2__GPIO7_8 */
1149 0x80000000 /* MX53_PAD_GPIO_16__GPIO7_11 */
MX53_PAD_EIM_DA12__GPIO3_12 0x80000000
MX53_PAD_EIM_DA13__GPIO3_13 0x80000000
MX53_PAD_PATA_DA_0__GPIO7_6 0x80000000
+ MX53_PAD_PATA_DA_2__GPIO7_8 0x80000000
MX53_PAD_GPIO_16__GPIO7_11 0x80000000
>;
};

19
debian/patches/series vendored
View File

@ -69,39 +69,20 @@ features/all/alx/mark-as-staging.patch
debian/radeon-firmware-is-required-for-drm-and-kms-on-r600-onward.patch
bugfix/all/mm-Try-harder-to-allocate-vmemmap-blocks.patch
features/all/alx/alx-update-for-3.8.patch
debian/efi-autoload-efivars.patch
debian/efivars-remove-check-for-50-full-on-write.patch
debian/cdc_ncm-cdc_mbim-use-ncm-by-default.patch
debian/powerpcspe-omit-uimage.patch
features/arm/0009-USB-EHCI-split-ehci-omap-out-to-a-separate-driver.patch
features/arm/0010-USB-EHCI-make-ehci-orion-a-separate-driver.patch
bugfix/arm/mvneta-module-fix.patch
bugfix/arm/i2c-imx-add-module_device_table.patch
bugfix/arm/imx-sgtl5000-probe-defer.patch
features/arm/0001-usb-chipidea-usbmisc-rename-file-struct-and-function.patch
features/arm/0001-usb-chipidea-usbmisc-unset-global-varibale-usbmisc-o.patch
features/arm/0001-usb-chipidea-usbmisc-fix-a-potential-race-condition.patch
features/arm/0001-usb-chipidea-usbmisc-prepare-driver-to-handle-more-t.patch
features/arm/0001-usb-chipidea-usbmisc-add-mx53-support.patch
features/arm/0001-usb-chipidea-usbmisc-add-post-handling-and-errata-fi.patch
features/arm/0001-usb-phy-nop-Add-some-parameters-to-platform-data.patch
features/arm/0001-usb-phy-nop-use-devm_kzalloc.patch
features/arm/0001-usb-phy-nop-Manage-PHY-clock.patch
features/arm/0002-usb-phy-nop-Handle-power-supply-regulator-for-the-PH.patch
features/arm/0003-usb-phy-nop-Handle-RESET-for-the-PHY.patch
features/arm/0004-usb-phy-nop-use-new-PHY-API-to-register-PHY.patch
features/arm/0005-usb-phy-nop-Add-device-tree-support-and-binding-info.patch
features/arm/0006-USB-phy-nop-Defer-probe-if-device-needs-VCC-RESET.patch
features/arm/ARM-dts-imx-add-imx5x-usbmisc-entries.patch
features/arm/ARM-dts-imx-add-imx5x-usb-clock-DT-lookups.patch
features/arm/ARM-dts-imx-use-usb-nop-xceiv-usbphy-entries-for-imx5x.patch
features/arm/ARM-dts-imx-imx53-qsb.dts-enable-usbotg-and-usbh1.patch
features/arm/usbmisc-imx-add-module_device_table.patch
features/arm/imx53-qsb-usb-power.patch
features/arm/0001-thermal-Add-driver-for-Armada-370-XP-SoC-thermal-man.patch
features/arm/0001-ARM-mvebu-Add-thermal-support-to-Armada-XP-device-tr.patch
bugfix/all/iscsi-target-fix-heap-buffer-overflow-on-error.patch