Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964806AbXBTHDi (ORCPT ); Tue, 20 Feb 2007 02:03:38 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964811AbXBTHDi (ORCPT ); Tue, 20 Feb 2007 02:03:38 -0500 Received: from ug-out-1314.google.com ([66.249.92.170]:44841 "EHLO ug-out-1314.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964802AbXBTHDU (ORCPT ); Tue, 20 Feb 2007 02:03:20 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=KqmbuRxUGs03XLs7aOgw75YNGqcU8hb2a+Nm9TrQL/KJb47tdi8RwCuIhkwnnRm16R1ye93+zsmitEMicYBD854HBxaNICWhq191YOnxYv6bQDnKUkFnK+XDGo7LZbe7dm4Ay8g/idJ9Exqj1q3icUjAFpvLb5kVZiTUA9vgOxk= Message-ID: <3634de740702192303xea41f14i9f613fac2725b0ca@mail.gmail.com> Date: Tue, 20 Feb 2007 12:33:18 +0530 From: Maximus To: "Paul Mundt" , linux-kernel@vger.kernel.org, arjan@infradead.org Subject: Re: irqdesc porting help In-Reply-To: <20070215103347.GA18690@linux-sh.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_67916_32588830.1171954998406" References: <3634de740702142231k938a4c5ic824c2eefc95c1b0@mail.gmail.com> <20070215103347.GA18690@linux-sh.org> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 51280 Lines: 695 ------=_Part_67916_32588830.1171954998406 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, Sorry for the late response, attached is the code im trying to port to linux - 2.6.20. Regards, Jo On 2/15/07, Paul Mundt wrote: > On Thu, Feb 15, 2007 at 12:01:37PM +0530, Maximus wrote: > > Im trying to port some drivers between 2.6.14 and 2.6.19 > > > > I find that irqdesc has changed completely. how do i port > > the drivers between 2.6.14 and 2.6.19? > > > > is there a porting guide available to port the drivers > > which use irqdesc?. > > > > my drivers use variables triggered, ... which dont exist in 2.6.19 > > irqdesc strcuture. > > > Presumably you're talking about the struct hw_interrupt_type and the lack > of an irq_desc[irq].handler? There's some migration helper glue in > include/linux/irq.h that you can use, but you're better off converting > completely. You can at least get it building again by changing to > irq_desc[irq].chip, but you really want a proper irq_chip implementation > to go along with this, rather than munging in the hw_interrupt_type. > > You can easily compare before-and-after versions of most of the IRQ > controllers to identify the minimal changes required. > ------=_Part_67916_32588830.1171954998406 Content-Type: text/x-csrc; name=twl4030_core.c; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: base64 X-Attachment-Id: f_eyd9xq0k Content-Disposition: attachment; filename="twl4030_core.c" LyoKICogbGludXgvZHJpdmVycy9pMmMvY2hpcHMvdHdsNDAzMF9jb3JlLmMKICoKICogQ29weXJp Z2h0IChDKSAyMDA1LTIwMDYgVGV4YXMgSW5zdHJ1bWVudHMsIEluYy4KICoKICogTW9kaWZpY2F0 aW9ucyB0byBkZWZlciBpbnRlcnJ1cHQgaGFuZGxpbmcgdG8gYSBrZXJuZWwgdGhyZWFkOgogKiBD b3B5cmlnaHQgKEMpIDIwMDYgTW9udGFWaXN0YSBTb2Z0d2FyZSwgSW5jLgogKgogKiBCYXNlZCBv biB0bHYzMjBhaWMyMy5jOgogKiBDb3B5cmlnaHQgKGMpIGJ5IEthaSBTdmFobiA8a2FpLnN2YWhu QG5va2lhLmNvbT4KICoKICogVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4g cmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkKICogaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRo ZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkKICogdGhlIEZyZWUg U29mdHdhcmUgRm91bm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JU1JfUDEgICAgICAgICAgICAgICAgICAg ICAgICAgICAoMHgxKQojZGVmaW5lIFJFR19QSUhfSVNSX1AyICAgICAgICAgICAgICAgICAgICAg ICAgICAgKDB4MikKI2RlZmluZSBSRUdfUElIX1NJUiAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICgweDMpCgovKioqKiBCaXRGaWVsZCBEZWZpbml0aW9ucyAqLwoKLyogUElIX0lTUl9QMSBG aWVsZHMgKi8KI2RlZmluZSBCSVRfUElIX0lTUl9QMV9QSUhfSVNSMCAgICAgICAgICAgICAgICAg ICgweDAwMCkKI2RlZmluZSBCSVRfUElIX0lTUl9QMV9QSUhfSVNSMF9NICAgICAgICAgICAgICAg ICgweDAwMDAwMDAxKQojZGVmaW5lIEJJVF9QSUhfSVNSX1AxX1BJSF9JU1IxICAgICAgICAgICAg ICAgICAgKDB4MDAxKQojZGVmaW5lIEJJVF9QSUhfSVNSX1AxX1BJSF9JU1IxX00gICAgICAgICAg ICAgICAgKDB4MDAwMDAwMDIpCiNkZWZpbmUgQklUX1BJSF9JU1JfUDFfUElIX0lTUjIgICAgICAg ICAgICAgICAgICAoMHgwMDIpCiNkZWZpbmUgQklUX1BJSF9JU1JfUDFfUElIX0lTUjJfTSAgICAg ICAgICAgICAgICAoMHgwMDAwMDAwNCkKI2RlZmluZSBCSVRfUElIX0lTUl9QMV9QSUhfSVNSMyAg ICAgICAgICAgICAgICAgICgweDAwMykKI2RlZmluZSBCSVRfUElIX0lTUl9QMV9QSUhfSVNSM19N ICAgICAgICAgICAgICAgICgweDAwMDAwMDA4KQojZGVmaW5lIEJJVF9QSUhfSVNSX1AxX1BJSF9J U1I0ICAgICAgICAgICAgICAgICAgKDB4MDA0KQojZGVmaW5lIEJJVF9QSUhfSVNSX1AxX1BJSF9J U1I0X00gICAgICAgICAgICAgICAgKDB4MDAwMDAwMTApCiNkZWZpbmUgQklUX1BJSF9JU1JfUDFf UElIX0lTUjUgICAgICAgICAgICAgICAgICAoMHgwMDUpCiNkZWZpbmUgQklUX1BJSF9JU1JfUDFf UElIX0lTUjVfTSAgICAgICAgICAgICAgICAoMHgwMDAwMDAyMCkKI2RlZmluZSBCSVRfUElIX0lT Ul9QMV9QSUhfSVNSNiAgICAgICAgICAgICAgICAgICgweDAwNikKI2RlZmluZSBCSVRfUElIX0lT Ul9QMV9QSUhfSVNSNl9NICAgICAgICAgICAgICAgICgweDAwMDAwMDQwKQojZGVmaW5lIEJJVF9Q SUhfSVNSX1AxX1BJSF9JU1I3ICAgICAgICAgICAgICAgICAgKDB4MDA3KQojZGVmaW5lIEJJVF9Q SUhfSVNSX1AxX1BJSF9JU1I3X00gICAgICAgICAgICAgICAgKDB4MDAwMDAwODApCi8qIFBJSF9J U1JfUDIgRmllbGRzICovCiNkZWZpbmUgQklUX1BJSF9JU1JfUDJfUElIX0lTUjAgICAgICAgICAg ICAgICAgICAoMHgwMDApCiNkZWZpbmUgQklUX1BJSF9JU1JfUDJfUElIX0lTUjBfTSAgICAgICAg ICAgICAgICAoMHgwMDAwMDAwMSkKI2RlZmluZSBCSVRfUElIX0lTUl9QMl9QSUhfSVNSMSAgICAg ICAgICAgICAgICAgICgweDAwMSkKI2RlZmluZSBCSVRfUElIX0lTUl9QMl9QSUhfSVNSMV9NICAg ICAgICAgICAgICAgICgweDAwMDAwMDAyKQojZGVmaW5lIEJJVF9QSUhfSVNSX1AyX1BJSF9JU1Iy ICAgICAgICAgICAgICAgICAgKDB4MDAyKQojZGVmaW5lIEJJVF9QSUhfSVNSX1AyX1BJSF9JU1Iy X00gICAgICAgICAgICAgICAgKDB4MDAwMDAwMDQpCiNkZWZpbmUgQklUX1BJSF9JU1JfUDJfUElI X0lTUjMgICAgICAgICAgICAgICAgICAoMHgwMDMpCiNkZWZpbmUgQklUX1BJSF9JU1JfUDJfUElI X0lTUjNfTSAgICAgICAgICAgICAgICAoMHgwMDAwMDAwOCkKI2RlZmluZSBCSVRfUElIX0lTUl9Q Ml9QSUhfSVNSNCAgICAgICAgICAgICAgICAgICgweDAwNCkKI2RlZmluZSBCSVRfUElIX0lTUl9Q Ml9QSUhfSVNSNF9NICAgICAgICAgICAgICAgICgweDAwMDAwMDEwKQojZGVmaW5lIEJJVF9QSUhf SVNSX1AyX1BJSF9JU1I1ICAgICAgICAgICAgICAgICAgKDB4MDA1KQojZGVmaW5lIEJJVF9QSUhf SVNSX1AyX1BJSF9JU1I1X00gICAgICAgICAgICAgICAgKDB4MDAwMDAwMjApCiNkZWZpbmUgQklU X1BJSF9JU1JfUDJfUElIX0lTUjYgICAgICAgICAgICAgICAgICAoMHgwMDYpCiNkZWZpbmUgQklU X1BJSF9JU1JfUDJfUElIX0lTUjZfTSAgICAgICAgICAgICAgICAoMHgwMDAwMDA0MCkKI2RlZmlu ZSBCSVRfUElIX0lTUl9QMl9QSUhfSVNSNyAgICAgICAgICAgICAgICAgICgweDAwNykKI2RlZmlu ZSBCSVRfUElIX0lTUl9QMl9QSUhfSVNSN19NICAgICAgICAgICAgICAgICgweDAwMDAwMDgwKQov KiBQSUhfU0lSIEZpZWxkcyAqLwojZGVmaW5lIEJJVF9QSUhfU0lSX1BJSDFTSVIgICAgICAgICAg ICAgICAgICAgICAgKDB4MDAwKQojZGVmaW5lIEJJVF9QSUhfU0lSX1BJSDFTSVJfTSAgICAgICAg ICAgICAgICAgICAgKDB4MDAwMDAwMDEpCiNkZWZpbmUgQklUX1BJSF9TSVJfUElIMlNJUiAgICAg ICAgICAgICAgICAgICAgICAoMHgwMDEpCiNkZWZpbmUgQklUX1BJSF9TSVJfUElIMlNJUl9NICAg ICAgICAgICAgICAgICAgICAoMHgwMDAwMDAwMikKI2RlZmluZSBCSVRfUElIX1NJUl9QSUgzU0lS ICAgICAgICAgICAgICAgICAgICAgICgweDAwMikKI2RlZmluZSBCSVRfUElIX1NJUl9QSUgzU0lS X00gICAgICAgICAgICAgICAgICAgICgweDAwMDAwMDA0KQojZGVmaW5lIEJJVF9QSUhfU0lSX1BJ SDRTSVIgICAgICAgICAgICAgICAgICAgICAgKDB4MDAzKQojZGVmaW5lIEJJVF9QSUhfU0lSX1BJ SDRTSVJfTSAgICAgICAgICAgICAgICAgICAgKDB4MDAwMDAwMDgpCiNkZWZpbmUgQklUX1BJSF9T SVJfUElINVNJUiAgICAgICAgICAgICAgICAgICAgICAoMHgwMDQpCiNkZWZpbmUgQklUX1BJSF9T SVJfUElINVNJUl9NICAgICAgICAgICAgICAgICAgICAoMHgwMDAwMDAxMCkKI2RlZmluZSBCSVRf UElIX1NJUl9QSUg2U0lSICAgICAgICAgICAgICAgICAgICAgICgweDAwNSkKI2RlZmluZSBCSVRf UElIX1NJUl9QSUg2U0lSX00gICAgICAgICAgICAgICAgICAgICgweDAwMDAwMDIwKQoKLyogVHJp dG9uIENvcmUgaW50ZXJuYWwgaW5mb3JtYXRpb24gKEJFR0lOKSAqLwoKLyogTGFzdCAtIGZvciBp bmRleCBtYXgqLwojZGVmaW5lIFRXTDQwMzBfTU9EVUxFX0xBU1QgICAgICAgICBUV0w0MDMwX01P RFVMRV9TRUNVUkVEX1JFRwoKLyogU2xhdmUgYWRkcmVzcyAqLwojZGVmaW5lIFRXTDQwMzBfTlVN X1NMQVZFUyAgICAgICAgICAweDA0CiNkZWZpbmUgVFdMNDAzMF9TTEFWRU5VTV9OVU0wICAgICAg IDB4MDAKI2RlZmluZSBUV0w0MDMwX1NMQVZFTlVNX05VTTEgICAgICAgMHgwMQojZGVmaW5lIFRX TDQwMzBfU0xBVkVOVU1fTlVNMiAgICAgICAweDAyCiNkZWZpbmUgVFdMNDAzMF9TTEFWRU5VTV9O VU0zICAgICAgIDB4MDMKI2RlZmluZSBUV0w0MDMwX1NMQVZFSURfSUQwICAgICAgICAgMHg0OAoj ZGVmaW5lIFRXTDQwMzBfU0xBVkVJRF9JRDEgICAgICAgICAweDQ5CiNkZWZpbmUgVFdMNDAzMF9T TEFWRUlEX0lEMiAgICAgICAgIDB4NEEKI2RlZmluZSBUV0w0MDMwX1NMQVZFSURfSUQzICAgICAg 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PICJUV0w0MDMwOiBEcml2ZXIgcmVnaXN0cmF0aW9uIGNvbXBs ZXRlLlxuIik7CglGTl9PVVQocmVzKTsKCXJldHVybiByZXM7Cn0KCnN0YXRpYyB2b2lkIF9fZXhp dCB0d2w0MDMwX2V4aXQodm9pZCkKewoJRk5fSU47CglpZiAoaTJjX2RlbF9kcml2ZXIoJnR3bDQw MzBfZHJpdmVyKSkgewoJCXByaW50ayhLRVJOX0VSUgoJCSAgICAgICAiVFdMNDAzMDogRHJpdmVy IHJlbW92ZSBmYWlsZWQsIG1vZHVsZSBub3QgcmVtb3ZlZC5cbiIpOwoJfQoJdHdsX2lycV91c2Vk ID0gRlJFRTsKI2lmIChUV0w0MDMwX0lSUU5VTSAhPSBJTlRfU1lTKQoJb21hcF9mcmVlX2dwaW8o VFdMNDAzMF9HUElPKTsKI2VuZGlmCgoJRk5fT1VUKDApOwp9CgpzdWJzeXNfaW5pdGNhbGwodHds NDAzMF9pbml0KTsKbW9kdWxlX2V4aXQodHdsNDAzMF9leGl0KTsKCkVYUE9SVF9TWU1CT0wodHds NDAzMF9pMmNfd3JpdGVfdTgpOwpFWFBPUlRfU1lNQk9MKHR3bDQwMzBfaTJjX3JlYWRfdTgpOwpF WFBPUlRfU1lNQk9MKHR3bDQwMzBfaTJjX3JlYWQpOwpFWFBPUlRfU1lNQk9MKHR3bDQwMzBfaTJj X3dyaXRlKTsKCk1PRFVMRV9BVVRIT1IoIlRleGFzIEluc3RydW1lbnRzLCBJbmMuIik7Ck1PRFVM RV9ERVNDUklQVElPTigiSTJDIENvcmUgaW50ZXJmYWNlIGZvciBUV0w0MDMwIik7Ck1PRFVMRV9M SUNFTlNFKCJHUEwiKTsK ------=_Part_67916_32588830.1171954998406-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/