From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from flow-a5-smtp.messagingengine.com (flow-a5-smtp.messagingengine.com [103.168.172.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 403923B7B7D; Tue, 8 Sep 2026 20:36:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.140 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788899827; cv=none; b=NOvXwq5seur9Tne0SbQvDbP/7cy8oR46VOTXPC4o5X+6X7YK6lOar1sS/ot2uPncRTIyLP5eC5hg+eSHLSXqGk11bfJp/xPIQcaGQkBa1V1GK5HKHVT7IzrCgAJbHQeh38+otf+IQ4AyNxMFbmYI3yfJPJOfh536dA6bnhTmX3c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788899827; c=relaxed/simple; bh=sMPcXLuOphJeQMkameJw++rgwLy18Ig2Mso5jsVxFa0=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=RIkWxlK+SQ1XY7q0lUqDt+l556FGyQa+UJ8bPbMcLyip9v+ilU7lgUfhhgDXw9uDDRQcfjx+TWdkae1bAlnW+vzZgXtLTscjtkY6HZUHmKn6ALy2oMgb64Byr35zO3EVnz830tOv3GDMJIAmC82RW+2RzVgizjNc60CA9k64qAE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fluxnic.net; spf=pass smtp.mailfrom=fluxnic.net; dkim=pass (2048-bit key) header.d=fluxnic.net header.i=@fluxnic.net header.b=NAjOOp05; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=MYpK106Q; arc=none smtp.client-ip=103.168.172.140 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fluxnic.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fluxnic.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fluxnic.net header.i=@fluxnic.net header.b="NAjOOp05"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="MYpK106Q" Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailflow.phl.internal (Postfix) with ESMTP id 2818A1380359; Tue, 8 Sep 2026 16:36:50 -0400 (EDT) Received: from phl-frontend-02 ([10.202.2.161]) by phl-compute-02.internal (MEProxy); Tue, 08 Sep 2026 16:36:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fluxnic.net; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1788899810; x=1788907010; bh=pqUYW0bsIz 1MRJiTH8ODR5+Z5OztYYD4i1MgDVOm6Ak=; b=NAjOOp05FmBMCS7dxQLJgfE2hW w6TUKChriB4ipjT1C/6b0BkxUz1AY2TxoiMK+d0OLY6biHPKdiPdBG579O206u38 iPIw4dV0h78BOX1zuO0RuqpPRDBQNCsV6w/MTx5tIfzkamPLDM/t/tPDF37ZBDR4 +/cfV32omocYxL7PmrFeH6e1tiZAcFt37hoRzL45GTHl9iWDMD5biy9GYnsQ/f0X w2yb+XK5fyluUyuiotabWB3wyvO2bxmIyWULP/S/uIXUkrkLaOY4dByDPpWaUBQW vZs/hrvrpPxYyuDjLBBawucs6tvR21OnHV3dJteTR4E7Yr7Bh51VW46T7opw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1788899810; x=1788907010; bh=pqUYW0bsIz1MRJiTH8ODR5+Z5OztYYD4i1M gDVOm6Ak=; b=MYpK106QXa7SHrHxJopUfAJ3PRzS3CSPQeayYizwMukJOIUp2SJ j7My+KWUA0Z6dapoxnefDkY3GvvElpd4ecqc8qd4vu0y5qCkecMfNwA3YV/BE6jS QLi4hnObup94Ibig4PI2E3gMVUbu07hS0u4LkRViEi0UJHan0jFRabKKXC+fIeXv qY+XgX/0cOCJTnsvOoGaZmuVCdy446zPJJPTtgVs/F3OrcFi1nWCXGWaD8yUbzde q+FkKqYDydkyGIvb4d/q2PsxXCneBiRMHaZCIE893hrfsTVkQMyDLBiwrwDC20f2 YRlQaaCNjyDF3hRcHxkBIKBj/wkbnjY4VnA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTE3ZM/SyJJA5f9HJ6ZEJfDxDBonK9o25olEG6PIQKs019YlNZrd9dn7Sc/XieHUcn 5Kznh4bYlFFvrlgM0rAcn9kzln6yXI2mNyzRAv3J766/zGBxu4EMIY9kvp6oEkP+Q43sod NRBRo3shWtSAyJBu5giVwhJTG1SgAj27FXDUgKHLUqkLV4AFmVrdJg1JIm4AIKexghDbST j0bKh8CpkTqDHEMdT+eTdCx0gRj81FD3gckw52No1X4hJ5kYUwTEbtokIu9wVoyKsuCxUy 7TJa9VU5nvtnhi1MXAPtmZ6eFaAbOPADYf/SrfNoscB8eOamERk90sczQcrmJPAHElTQPe N4NLzYtFM6Ocy827qv2x6TH+PHiOV6QRjeWUq0XAzRCiRcb4VNX4xrfpgq1i/xusCU4tOo N1vr/d8UiQv6r7ejvVBQln1fAqi9lDmu22+E4QR2QXeOLyv/sYPUrWysP66I6b99col9UY 7nP7WiRIU/nktdjaMe19n7N5fB0JO0RbS1/XHt5wWUDaBONXrJCECjHiMPmSJpG773JZao EVvFvK8Q14ff3eSF47FCS+T+Q/U/5q8Z/WO3frif+A5JE1HI4WpeprpCNv8tp8YnUT+pAJ ZSvAg4V3uYrq++o5abUpSSu4H8jNuQhP0cnLHl3D2Xml56hamgJ+oFBSjlg3ydRbHKKMrZ Ml5wDHaY9nuRUxf+s0RsVxKVLn8WC+fBN5xc3C48pPk9TxrieEBX1ALdz56LDl82YWs1Lh 5dzzw3dHXi+jSWIUAa8OScul/lZVZjeDMJ5HjBrYNRI/e6xKljI/vdTwES1CTshlRV624Q QV/DMuI+3f33/HZpkPWRM98YMW1kUseELroJpS5Xx9g6Uq8l/lm7OkWolrPmT446Ai0qHP QuDASXKYZuybgf7krhXXBunk7kOh1BFezUixmDmLP4fVIaLZuAamHMR2f22JSeoYQgvRmi ES+w7eN7p6H24NgVzrhSo3rapypGtyaZeOYvMG3jZvHPpmZKoUs X-ME-Proxy: Feedback-ID: i58514971:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 8 Sep 2026 16:36:47 -0400 (EDT) Received: from xanadu (xanadu.lan [192.168.1.120]) by yoda.fluxnic.net (Postfix) with ESMTPSA id 6504219268; Tue, 08 Sep 2026 16:36:47 -0400 (EDT) Date: Tue, 8 Sep 2026 16:36:47 -0400 (EDT) From: Nicolas Pitre To: Arnd Bergmann cc: Krzysztof Kozlowski , Alexandre Belloni , Linus Walleij , Russell King , Drew Fustini , Arnd Bergmann , Rob Herring , Conor Dooley , Liviu Dudau , Sudeep Holla , Lorenzo Pieralisi , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Vladimir Zapolskiy , Stefan Agner , Maxime Coquelin , Alexandre Torgue , Aaro Koskinen , Andreas Kemnade , Kevin Hilman , Roger Quadros , Tony Lindgren , Nicolas Ferre , Claudiu Beznea , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , Robert Jarzmik , Kristoffer Ericson , Ethan Nelson-Moore , Geert Uytterhoeven , Alexander Sverdlin , Shawn Guo , Karl Mehltretter , "David Hildenbrand (Arm)" , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-stm32@st-md-mailman.stormreply.com, linux-omap@vger.kernel.org, Guenter Roeck Subject: Re: [PATCH 01/13] ARM: remove sa1100 platform In-Reply-To: <20260908152808.3928630-2-arnd@kernel.org> Message-ID: References: <20260908152808.3928630-1-arnd@kernel.org> <20260908152808.3928630-2-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII On Tue, 8 Sep 2026, Arnd Bergmann wrote: > From: Arnd Bergmann > > Most sa1100 platforms were removed a few years, with the remaining > ones left as a starting point for a conversion to devicetree. > > Nothing ever happened on that front, so remove the rest now, > including the sa1111 and locomo drivers that were once shared > with pxa but are already sa1100-exclusive now. The SA1100 was the starting point of my career. Feels strange how much time has passed. I parted with such hardware a long time ago in any case. Acked-by: Nicolas Pitre > > Cc: Russell King > Cc: Linus Walleij > Cc: Kristoffer Ericson > Cc: Guenter Roeck > Cc: Ethan Nelson-Moore > Signed-off-by: Arnd Bergmann > --- > Documentation/arch/arm/index.rst | 3 - > Documentation/arch/arm/sa1100/assabet.rst | 301 --- > Documentation/arch/arm/sa1100/cerf.rst | 35 - > Documentation/arch/arm/sa1100/index.rst | 13 - > Documentation/arch/arm/sa1100/lart.rst | 15 - > Documentation/arch/arm/sa1100/serial_uart.rst | 51 - > MAINTAINERS | 8 - > arch/arm/Kconfig | 16 +- > arch/arm/Kconfig.debug | 13 +- > arch/arm/Makefile | 6 - > arch/arm/boot/bootp/Makefile | 1 - > arch/arm/boot/compressed/Makefile | 4 - > arch/arm/boot/compressed/head-sa1100.S | 45 - > arch/arm/boot/compressed/head.S | 7 - > arch/arm/common/Kconfig | 7 - > arch/arm/common/Makefile | 2 - > arch/arm/common/locomo.c | 886 -------- > arch/arm/common/sa1111.c | 1413 ------------- > arch/arm/configs/assabet_defconfig | 57 - > arch/arm/configs/collie_defconfig | 87 - > arch/arm/configs/h3600_defconfig | 63 - > arch/arm/configs/jornada720_defconfig | 95 - > arch/arm/configs/neponset_defconfig | 88 - > arch/arm/include/asm/cputype.h | 4 - > arch/arm/include/asm/hardware/locomo.h | 217 -- > arch/arm/include/asm/hardware/sa1111.h | 442 ---- > arch/arm/include/asm/hardware/ssp.h | 25 - > arch/arm/include/debug/sa1100.S | 67 - > arch/arm/mach-sa1100/Kconfig | 92 - > arch/arm/mach-sa1100/Makefile | 20 - > arch/arm/mach-sa1100/assabet.c | 770 ------- > arch/arm/mach-sa1100/clock.c | 145 -- > arch/arm/mach-sa1100/collie.c | 447 ---- > arch/arm/mach-sa1100/generic.c | 470 ----- > arch/arm/mach-sa1100/generic.h | 58 - > arch/arm/mach-sa1100/h3600.c | 134 -- > arch/arm/mach-sa1100/h3xxx.c | 305 --- > arch/arm/mach-sa1100/include/mach/SA-1100.h | 1798 ----------------- > arch/arm/mach-sa1100/include/mach/assabet.h | 99 - > arch/arm/mach-sa1100/include/mach/bitfield.h | 113 -- > arch/arm/mach-sa1100/include/mach/collie.h | 94 - > arch/arm/mach-sa1100/include/mach/generic.h | 1 - > arch/arm/mach-sa1100/include/mach/h3xxx.h | 81 - > arch/arm/mach-sa1100/include/mach/hardware.h | 56 - > arch/arm/mach-sa1100/include/mach/irqs.h | 101 - > .../arm/mach-sa1100/include/mach/jornada720.h | 28 - > arch/arm/mach-sa1100/include/mach/memory.h | 37 - > arch/arm/mach-sa1100/include/mach/mtd-xip.h | 23 - > arch/arm/mach-sa1100/include/mach/neponset.h | 31 - > arch/arm/mach-sa1100/include/mach/reset.h | 18 - > .../arm/mach-sa1100/include/mach/uncompress.h | 52 - > arch/arm/mach-sa1100/jornada720.c | 380 ---- > arch/arm/mach-sa1100/jornada720_ssp.c | 202 -- > arch/arm/mach-sa1100/neponset.c | 438 ---- > arch/arm/mach-sa1100/pm.c | 128 -- > arch/arm/mach-sa1100/sleep.S | 143 -- > arch/arm/mach-sa1100/ssp.c | 240 --- > arch/arm/mm/init.c | 5 - > arch/arm/mm/mmu.c | 8 - > drivers/rtc/Kconfig | 4 +- > drivers/rtc/rtc-sa1100.c | 16 +- > drivers/watchdog/Kconfig | 12 +- > 62 files changed, 19 insertions(+), 10501 deletions(-) > delete mode 100644 Documentation/arch/arm/sa1100/assabet.rst > delete mode 100644 Documentation/arch/arm/sa1100/cerf.rst > delete mode 100644 Documentation/arch/arm/sa1100/index.rst > delete mode 100644 Documentation/arch/arm/sa1100/lart.rst > delete mode 100644 Documentation/arch/arm/sa1100/serial_uart.rst > delete mode 100644 arch/arm/boot/compressed/head-sa1100.S > delete mode 100644 arch/arm/common/locomo.c > delete mode 100644 arch/arm/common/sa1111.c > delete mode 100644 arch/arm/configs/assabet_defconfig > delete mode 100644 arch/arm/configs/collie_defconfig > delete mode 100644 arch/arm/configs/h3600_defconfig > delete mode 100644 arch/arm/configs/jornada720_defconfig > delete mode 100644 arch/arm/configs/neponset_defconfig > delete mode 100644 arch/arm/include/asm/hardware/locomo.h > delete mode 100644 arch/arm/include/asm/hardware/sa1111.h > delete mode 100644 arch/arm/include/asm/hardware/ssp.h > delete mode 100644 arch/arm/include/debug/sa1100.S > delete mode 100644 arch/arm/mach-sa1100/Kconfig > delete mode 100644 arch/arm/mach-sa1100/Makefile > delete mode 100644 arch/arm/mach-sa1100/assabet.c > delete mode 100644 arch/arm/mach-sa1100/clock.c > delete mode 100644 arch/arm/mach-sa1100/collie.c > delete mode 100644 arch/arm/mach-sa1100/generic.c > delete mode 100644 arch/arm/mach-sa1100/generic.h > delete mode 100644 arch/arm/mach-sa1100/h3600.c > delete mode 100644 arch/arm/mach-sa1100/h3xxx.c > delete mode 100644 arch/arm/mach-sa1100/include/mach/SA-1100.h > delete mode 100644 arch/arm/mach-sa1100/include/mach/assabet.h > delete mode 100644 arch/arm/mach-sa1100/include/mach/bitfield.h > delete mode 100644 arch/arm/mach-sa1100/include/mach/collie.h > delete mode 100644 arch/arm/mach-sa1100/include/mach/generic.h > delete mode 100644 arch/arm/mach-sa1100/include/mach/h3xxx.h > delete mode 100644 arch/arm/mach-sa1100/include/mach/hardware.h > delete mode 100644 arch/arm/mach-sa1100/include/mach/irqs.h > delete mode 100644 arch/arm/mach-sa1100/include/mach/jornada720.h > delete mode 100644 arch/arm/mach-sa1100/include/mach/memory.h > delete mode 100644 arch/arm/mach-sa1100/include/mach/mtd-xip.h > delete mode 100644 arch/arm/mach-sa1100/include/mach/neponset.h > delete mode 100644 arch/arm/mach-sa1100/include/mach/reset.h > delete mode 100644 arch/arm/mach-sa1100/include/mach/uncompress.h > delete mode 100644 arch/arm/mach-sa1100/jornada720.c > delete mode 100644 arch/arm/mach-sa1100/jornada720_ssp.c > delete mode 100644 arch/arm/mach-sa1100/neponset.c > delete mode 100644 arch/arm/mach-sa1100/pm.c > delete mode 100644 arch/arm/mach-sa1100/sleep.S > delete mode 100644 arch/arm/mach-sa1100/ssp.c > > diff --git a/Documentation/arch/arm/index.rst b/Documentation/arch/arm/index.rst > index b15621093f7a..a292b8ac41ce 100644 > --- a/Documentation/arch/arm/index.rst > +++ b/Documentation/arch/arm/index.rst > @@ -48,9 +48,6 @@ SoC-specific documents > > pxa/mfp > > - > - sa1100/index > - > stm32/stm32f746-overview > stm32/overview > stm32/stm32h743-overview > diff --git a/Documentation/arch/arm/sa1100/assabet.rst b/Documentation/arch/arm/sa1100/assabet.rst > deleted file mode 100644 > index a761e128fb08..000000000000 > --- a/Documentation/arch/arm/sa1100/assabet.rst > +++ /dev/null > @@ -1,301 +0,0 @@ > -============================================ > -The Intel Assabet (SA-1110 evaluation) board > -============================================ > - > -Please see: > -http://developer.intel.com > - > -Also some notes from John G Dorsey : > -http://www.cs.cmu.edu/~wearable/software/assabet.html > - > - > -Building the kernel > -------------------- > - > -To build the kernel with current defaults:: > - > - make assabet_defconfig > - make oldconfig > - make zImage > - > -The resulting kernel image should be available in linux/arch/arm/boot/zImage. > - > - > -Installing a bootloader > ------------------------ > - > -A couple of bootloaders able to boot Linux on Assabet are available: > - > -BLOB (http://www.lartmaker.nl/lartware/blob/) > - > - BLOB is a bootloader used within the LART project. Some contributed > - patches were merged into BLOB to add support for Assabet. > - > -Compaq's Bootldr + John Dorsey's patch for Assabet support > -(http://www.handhelds.org/Compaq/bootldr.html) > -(http://www.wearablegroup.org/software/bootldr/) > - > - Bootldr is the bootloader developed by Compaq for the iPAQ Pocket PC. > - John Dorsey has produced add-on patches to add support for Assabet and > - the JFFS filesystem. > - > -RedBoot (http://sources.redhat.com/redboot/) > - > - RedBoot is a bootloader developed by Red Hat based on the eCos RTOS > - hardware abstraction layer. It supports Assabet amongst many other > - hardware platforms. > - > -RedBoot is currently the recommended choice since it's the only one to have > -networking support, and is the most actively maintained. > - > -Brief examples on how to boot Linux with RedBoot are shown below. But first > -you need to have RedBoot installed in your flash memory. A known to work > -precompiled RedBoot binary is available from the following location: > - > -- ftp://ftp.netwinder.org/users/n/nico/ > -- ftp://ftp.arm.linux.org.uk/pub/linux/arm/people/nico/ > -- ftp://ftp.handhelds.org/pub/linux/arm/sa-1100-patches/ > - > -Look for redboot-assabet*.tgz. Some installation infos are provided in > -redboot-assabet*.txt. > - > - > -Initial RedBoot configuration > ------------------------------ > - > -The commands used here are explained in The RedBoot User's Guide available > -on-line at http://sources.redhat.com/ecos/docs.html. > -Please refer to it for explanations. > - > -If you have a CF network card (my Assabet kit contained a CF+ LP-E from > -Socket Communications Inc.), you should strongly consider using it for TFTP > -file transfers. You must insert it before RedBoot runs since it can't detect > -it dynamically. > - > -To initialize the flash directory:: > - > - fis init -f > - > -To initialize the non-volatile settings, like whether you want to use BOOTP or > -a static IP address, etc, use this command:: > - > - fconfig -i > - > - > -Writing a kernel image into flash > ---------------------------------- > - > -First, the kernel image must be loaded into RAM. If you have the zImage file > -available on a TFTP server:: > - > - load zImage -r -b 0x100000 > - > -If you rather want to use Y-Modem upload over the serial port:: > - > - load -m ymodem -r -b 0x100000 > - > -To write it to flash:: > - > - fis create "Linux kernel" -b 0x100000 -l 0xc0000 > - > - > -Booting the kernel > ------------------- > - > -The kernel still requires a filesystem to boot. A ramdisk image can be loaded > -as follows:: > - > - load ramdisk_image.gz -r -b 0x800000 > - > -Again, Y-Modem upload can be used instead of TFTP by replacing the file name > -by '-y ymodem'. > - > -Now the kernel can be retrieved from flash like this:: > - > - fis load "Linux kernel" > - > -or loaded as described previously. To boot the kernel:: > - > - exec -b 0x100000 -l 0xc0000 > - > -The ramdisk image could be stored into flash as well, but there are better > -solutions for on-flash filesystems as mentioned below. > - > - > -Using JFFS2 > ------------ > - > -Using JFFS2 (the Second Journalling Flash File System) is probably the most > -convenient way to store a writable filesystem into flash. JFFS2 is used in > -conjunction with the MTD layer which is responsible for low-level flash > -management. More information on the Linux MTD can be found on-line at: > -http://www.linux-mtd.infradead.org/. A JFFS howto with some infos about > -creating JFFS/JFFS2 images is available from the same site. > - > -For instance, a sample JFFS2 image can be retrieved from the same FTP sites > -mentioned below for the precompiled RedBoot image. > - > -To load this file:: > - > - load sample_img.jffs2 -r -b 0x100000 > - > -The result should look like:: > - > - RedBoot> load sample_img.jffs2 -r -b 0x100000 > - Raw file loaded 0x00100000-0x00377424 > - > -Now we must know the size of the unallocated flash:: > - > - fis free > - > -Result:: > - > - RedBoot> fis free > - 0x500E0000 .. 0x503C0000 > - > -The values above may be different depending on the size of the filesystem and > -the type of flash. See their usage below as an example and take care of > -substituting yours appropriately. > - > -We must determine some values:: > - > - size of unallocated flash: 0x503c0000 - 0x500e0000 = 0x2e0000 > - size of the filesystem image: 0x00377424 - 0x00100000 = 0x277424 > - > -We want to fit the filesystem image of course, but we also want to give it all > -the remaining flash space as well. To write it:: > - > - fis unlock -f 0x500E0000 -l 0x2e0000 > - fis erase -f 0x500E0000 -l 0x2e0000 > - fis write -b 0x100000 -l 0x277424 -f 0x500E0000 > - fis create "JFFS2" -n -f 0x500E0000 -l 0x2e0000 > - > -Now the filesystem is associated to a MTD "partition" once Linux has discovered > -what they are in the boot process. From Redboot, the 'fis list' command > -displays them:: > - > - RedBoot> fis list > - Name FLASH addr Mem addr Length Entry point > - RedBoot 0x50000000 0x50000000 0x00020000 0x00000000 > - RedBoot config 0x503C0000 0x503C0000 0x00020000 0x00000000 > - FIS directory 0x503E0000 0x503E0000 0x00020000 0x00000000 > - Linux kernel 0x50020000 0x00100000 0x000C0000 0x00000000 > - JFFS2 0x500E0000 0x500E0000 0x002E0000 0x00000000 > - > -However Linux should display something like:: > - > - SA1100 flash: probing 32-bit flash bus > - SA1100 flash: Found 2 x16 devices at 0x0 in 32-bit mode > - Using RedBoot partition definition > - Creating 5 MTD partitions on "SA1100 flash": > - 0x00000000-0x00020000 : "RedBoot" > - 0x00020000-0x000e0000 : "Linux kernel" > - 0x000e0000-0x003c0000 : "JFFS2" > - 0x003c0000-0x003e0000 : "RedBoot config" > - 0x003e0000-0x00400000 : "FIS directory" > - > -What's important here is the position of the partition we are interested in, > -which is the third one. Within Linux, this correspond to /dev/mtdblock2. > -Therefore to boot Linux with the kernel and its root filesystem in flash, we > -need this RedBoot command:: > - > - fis load "Linux kernel" > - exec -b 0x100000 -l 0xc0000 -c "root=/dev/mtdblock2" > - > -Of course other filesystems than JFFS might be used, like cramfs for example. > -You might want to boot with a root filesystem over NFS, etc. It is also > -possible, and sometimes more convenient, to flash a filesystem directly from > -within Linux while booted from a ramdisk or NFS. The Linux MTD repository has > -many tools to deal with flash memory as well, to erase it for example. JFFS2 > -can then be mounted directly on a freshly erased partition and files can be > -copied over directly. Etc... > - > - > -RedBoot scripting > ------------------ > - > -All the commands above aren't so useful if they have to be typed in every > -time the Assabet is rebooted. Therefore it's possible to automate the boot > -process using RedBoot's scripting capability. > - > -For example, I use this to boot Linux with both the kernel and the ramdisk > -images retrieved from a TFTP server on the network:: > - > - RedBoot> fconfig > - Run script at boot: false true > - Boot script: > - Enter script, terminate with empty line > - >> load zImage -r -b 0x100000 > - >> load ramdisk_ks.gz -r -b 0x800000 > - >> exec -b 0x100000 -l 0xc0000 > - >> > - Boot script timeout (1000ms resolution): 3 > - Use BOOTP for network configuration: true > - GDB connection port: 9000 > - Network debug at boot time: false > - Update RedBoot non-volatile configuration - are you sure (y/n)? y > - > -Then, rebooting the Assabet is just a matter of waiting for the login prompt. > - > - > - > -Nicolas Pitre > -nico@fluxnic.net > - > -June 12, 2001 > - > - > -Status of peripherals in -rmk tree (updated 14/10/2001) > -------------------------------------------------------- > - > -Assabet: > - Serial ports: > - Radio: TX, RX, CTS, DSR, DCD, RI > - - PM: Not tested. > - - COM: TX, RX, CTS, DSR, DCD, RTS, DTR, PM > - - PM: Not tested. > - - I2C: Implemented, not fully tested. > - - L3: Fully tested, pass. > - - PM: Not tested. > - > - Video: > - - LCD: Fully tested. PM > - > - (LCD doesn't like being blanked with neponset connected) > - > - - Video out: Not fully > - > - Audio: > - UDA1341: > - - Playback: Fully tested, pass. > - - Record: Implemented, not tested. > - - PM: Not tested. > - > - UCB1200: > - - Audio play: Implemented, not heavily tested. > - - Audio rec: Implemented, not heavily tested. > - - Telco audio play: Implemented, not heavily tested. > - - Telco audio rec: Implemented, not heavily tested. > - - POTS control: No > - - Touchscreen: Yes > - - PM: Not tested. > - > - Other: > - - PCMCIA: > - - LPE: Fully tested, pass. > - - USB: No > - - IRDA: > - - SIR: Fully tested, pass. > - - FIR: Fully tested, pass. > - - PM: Not tested. > - > -Neponset: > - Serial ports: > - - COM1,2: TX, RX, CTS, DSR, DCD, RTS, DTR > - - PM: Not tested. > - - USB: Implemented, not heavily tested. > - - PCMCIA: Implemented, not heavily tested. > - - CF: Implemented, not heavily tested. > - - PM: Not tested. > - > -More stuff can be found in the -np (Nicolas Pitre's) tree. > diff --git a/Documentation/arch/arm/sa1100/cerf.rst b/Documentation/arch/arm/sa1100/cerf.rst > deleted file mode 100644 > index 7fa71b609bf9..000000000000 > --- a/Documentation/arch/arm/sa1100/cerf.rst > +++ /dev/null > @@ -1,35 +0,0 @@ > -============== > -CerfBoard/Cube > -============== > - > -*** The StrongARM version of the CerfBoard/Cube has been discontinued *** > - > -The Intrinsyc CerfBoard is a StrongARM 1110-based computer on a board > -that measures approximately 2" square. It includes an Ethernet > -controller, an RS232-compatible serial port, a USB function port, and > -one CompactFlash+ slot on the back. Pictures can be found at the > -Intrinsyc website, http://www.intrinsyc.com. > - > -This document describes the support in the Linux kernel for the > -Intrinsyc CerfBoard. > - > -Supported in this version > -========================= > - > - - CompactFlash+ slot (select PCMCIA in General Setup and any options > - that may be required) > - - Onboard Crystal CS8900 Ethernet controller (Cerf CS8900A support in > - Network Devices) > - - Serial ports with a serial console (hardcoded to 38400 8N1) > - > -In order to get this kernel onto your Cerf, you need a server that runs > -both BOOTP and TFTP. Detailed instructions should have come with your > -evaluation kit on how to use the bootloader. This series of commands > -will suffice:: > - > - make ARCH=arm CROSS_COMPILE=arm-linux- cerfcube_defconfig > - make ARCH=arm CROSS_COMPILE=arm-linux- zImage > - make ARCH=arm CROSS_COMPILE=arm-linux- modules > - cp arch/arm/boot/zImage > - > -support@intrinsyc.com > diff --git a/Documentation/arch/arm/sa1100/index.rst b/Documentation/arch/arm/sa1100/index.rst > deleted file mode 100644 > index c9aed43280ff..000000000000 > --- a/Documentation/arch/arm/sa1100/index.rst > +++ /dev/null > @@ -1,13 +0,0 @@ > -.. SPDX-License-Identifier: GPL-2.0 > - > -==================== > -Intel StrongARM 1100 > -==================== > - > -.. toctree:: > - :maxdepth: 1 > - > - assabet > - cerf > - lart > - serial_uart > diff --git a/Documentation/arch/arm/sa1100/lart.rst b/Documentation/arch/arm/sa1100/lart.rst > deleted file mode 100644 > index 94c0568d1095..000000000000 > --- a/Documentation/arch/arm/sa1100/lart.rst > +++ /dev/null > @@ -1,15 +0,0 @@ > -==================================== > -Linux Advanced Radio Terminal (LART) > -==================================== > - > -The LART is a small (7.5 x 10cm) SA-1100 board, designed for embedded > -applications. It has 32 MB DRAM, 4MB Flash ROM, double RS232 and all > -other StrongARM-gadgets. Almost all SA signals are directly accessible > -through a number of connectors. The powersupply accepts voltages > -between 3.5V and 16V and is overdimensioned to support a range of > -daughterboards. A quad Ethernet / IDE / PS2 / sound daughterboard > -is under development, with plenty of others in different stages of > -planning. > - > -The hardware designs for this board have been released under an open license; > -see the LART page at http://www.lartmaker.nl/ for more information. > diff --git a/Documentation/arch/arm/sa1100/serial_uart.rst b/Documentation/arch/arm/sa1100/serial_uart.rst > deleted file mode 100644 > index ea983642b9be..000000000000 > --- a/Documentation/arch/arm/sa1100/serial_uart.rst > +++ /dev/null > @@ -1,51 +0,0 @@ > -================== > -SA1100 serial port > -================== > - > -The SA1100 serial port had its major/minor numbers officially assigned:: > - > - > Date: Sun, 24 Sep 2000 21:40:27 -0700 > - > From: H. Peter Anvin > - > To: Nicolas Pitre > - > Cc: Device List Maintainer > - > Subject: Re: device > - > > - > Okay. Note that device numbers 204 and 205 are used for "low density > - > serial devices", so you will have a range of minors on those majors (the > - > tty device layer handles this just fine, so you don't have to worry about > - > doing anything special.) > - > > - > So your assignments are: > - > > - > 204 char Low-density serial ports > - > 5 = /dev/ttySA0 SA1100 builtin serial port 0 > - > 6 = /dev/ttySA1 SA1100 builtin serial port 1 > - > 7 = /dev/ttySA2 SA1100 builtin serial port 2 > - > > - > 205 char Low-density serial ports (alternate device) > - > 5 = /dev/cusa0 Callout device for ttySA0 > - > 6 = /dev/cusa1 Callout device for ttySA1 > - > 7 = /dev/cusa2 Callout device for ttySA2 > - > > - > -You must create those inodes in /dev on the root filesystem used > -by your SA1100-based device:: > - > - mknod ttySA0 c 204 5 > - mknod ttySA1 c 204 6 > - mknod ttySA2 c 204 7 > - mknod cusa0 c 205 5 > - mknod cusa1 c 205 6 > - mknod cusa2 c 205 7 > - > -In addition to the creation of the appropriate device nodes above, you > -must ensure your user space applications make use of the correct device > -name. The classic example is the content of the /etc/inittab file where > -you might have a getty process started on ttyS0. > - > -In this case: > - > -- replace occurrences of ttyS0 with ttySA0, ttyS1 with ttySA1, etc. > - > -- don't forget to add 'ttySA0', 'console', or the appropriate tty name > - in /etc/securetty for root to be allowed to login as well. > diff --git a/MAINTAINERS b/MAINTAINERS > index 6215fcb07770..fd213c4bc257 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -2977,14 +2977,6 @@ F: arch/arm/boot/dts/hisilicon/ > F: arch/arm/mach-hisi/ > F: arch/arm64/boot/dts/hisilicon/ > > -ARM/HP JORNADA 7XX MACHINE SUPPORT > -M: Kristoffer Ericson > -S: Maintained > -W: www.jlime.com > -T: git git://git.kernel.org/pub/scm/linux/kernel/git/kristoffer/linux-hpc.git > -F: arch/arm/mach-sa1100/include/mach/jornada720.h > -F: arch/arm/mach-sa1100/jornada720.c > - > ARM/HPE GXP ARCHITECTURE > M: Jean-Marie Verdun > M: Nick Hawkins > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > index ffbc7f386131..7f4c2973d630 100644 > --- a/arch/arm/Kconfig > +++ b/arch/arm/Kconfig > @@ -161,7 +161,7 @@ config ARM > select TIMER_OF if OF > select HAVE_ARCH_VMAP_STACK if MMU && ARM_HAS_GROUP_RELOCS > select TRACE_IRQFLAGS_SUPPORT if !CPU_V7M > - select USE_OF if !(ARCH_FOOTBRIDGE || ARCH_RPC || ARCH_SA1100) > + select USE_OF if !(ARCH_FOOTBRIDGE || ARCH_RPC) > # Above selects are sorted alphabetically; please add new ones > # according to that. Thanks. > help > @@ -261,9 +261,6 @@ config GENERIC_ISA_DMA > config FIQ > bool > > -config ARCH_MTD_XIP > - bool > - > config ARM_PATCH_PHYS_VIRT > bool "Patch physical to virtual translations at runtime" if !ARCH_MULTIPLATFORM > default y > @@ -301,7 +298,7 @@ config PHYS_OFFSET > default 0x00000000 if ARCH_FOOTBRIDGE > default 0x10000000 if ARCH_OMAP1 || ARCH_RPC > default 0xa0000000 if ARCH_PXA > - default 0xc0000000 if ARCH_EP93XX || ARCH_SA1100 > + default 0xc0000000 if ARCH_EP93XX > default 0 > help > Please provide the physical address corresponding to the > @@ -341,7 +338,7 @@ config ARCH_MMAP_RND_BITS_MAX > > config ARCH_MULTIPLATFORM > bool "Require kernel to be portable to multiple machines" if EXPERT > - depends on MMU && !(ARCH_FOOTBRIDGE || ARCH_RPC || ARCH_SA1100) > + depends on MMU && !(ARCH_FOOTBRIDGE || ARCH_RPC) > default y > help > In general, all Arm machines can be supported in a single > @@ -445,8 +442,6 @@ source "arch/arm/mach-s3c/Kconfig" > > source "arch/arm/mach-s5pv210/Kconfig" > > -source "arch/arm/mach-sa1100/Kconfig" > - > source "arch/arm/mach-shmobile/Kconfig" > > source "arch/arm/mach-socfpga/Kconfig" > @@ -1201,7 +1196,7 @@ config ARCH_SELECT_MEMORY_MODEL > def_bool y > > config ARCH_FLATMEM_ENABLE > - def_bool !(ARCH_RPC || ARCH_SA1100) > + def_bool !ARCH_RPC > > config ARCH_SPARSEMEM_ENABLE > def_bool !ARCH_FOOTBRIDGE > @@ -1293,7 +1288,6 @@ config ARM_MODULE_PLTS > config ARCH_FORCE_MAX_ORDER > int "Order of maximal physically contiguous allocations" > default "11" if SOC_AM33XX > - default "8" if SA1111 > default "10" > help > The kernel page allocator limits the size of maximal physically > @@ -1605,7 +1599,7 @@ config ARCH_DEFAULT_CRASH_DUMP > > config AUTO_ZRELADDR > bool "Auto calculation of the decompressed kernel image address" if !ARCH_MULTIPLATFORM > - default !(ARCH_FOOTBRIDGE || ARCH_RPC || ARCH_SA1100) > + default !(ARCH_FOOTBRIDGE || ARCH_RPC) > help > ZRELADDR is the physical address where the decompressed kernel > image will be placed. If AUTO_ZRELADDR is selected, the address > diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug > index 366f162e147d..ad0feced4369 100644 > --- a/arch/arm/Kconfig.debug > +++ b/arch/arm/Kconfig.debug > @@ -1048,14 +1048,6 @@ choice > their output to UART 3. The port must have been initialised > by the boot-loader before use. > > - config DEBUG_SA1100 > - depends on ARCH_SA1100 > - bool "Use SA1100 UARTs for low-level debug" > - help > - Say Y here if you want kernel low-level debugging support > - on SA-11x0 UART ports. The kernel will check for the first > - enabled UART in a sequence 3-1-2. > - > config DEBUG_SD5203_UART > bool "Hisilicon SD5203 Debug UART" > depends on ARCH_SD5203 > @@ -1479,7 +1471,6 @@ config DEBUG_UART_FLOW_CONTROL > > config DEBUG_LL_INCLUDE > string > - default "debug/sa1100.S" if DEBUG_SA1100 > default "debug/palmchip.S" if DEBUG_UART_8250_PALMCHIP > default "debug/8250.S" if DEBUG_LL_UART_8250 || DEBUG_UART_8250 > default "debug/at91.S" if DEBUG_AT91_UART > @@ -1807,7 +1798,7 @@ config DEBUG_UART_8250_PALMCHIP > config DEBUG_UNCOMPRESS > bool "Enable decompressor debugging via DEBUG_LL output" > depends on !ARCH_MULTIPLATFORM > - depends on !(ARCH_FOOTBRIDGE || ARCH_RPC || ARCH_SA1100) > + depends on !(ARCH_FOOTBRIDGE || ARCH_RPC) > depends on DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \ > (!DEBUG_TEGRA_UART || !ZBOOT_ROM) && \ > !DEBUG_BRCMSTB_UART && !DEBUG_SEMIHOSTING > @@ -1817,7 +1808,7 @@ config DEBUG_UNCOMPRESS > > config UNCOMPRESS_INCLUDE > string > - default "mach/uncompress.h" if ARCH_FOOTBRIDGE || ARCH_RPC || ARCH_SA1100 > + default "mach/uncompress.h" if ARCH_FOOTBRIDGE || ARCH_RPC > default "debug/uncompress.h" > > config EARLY_PRINTK > diff --git a/arch/arm/Makefile b/arch/arm/Makefile > index 573813ef5e77..ea3da21202c8 100644 > --- a/arch/arm/Makefile > +++ b/arch/arm/Makefile > @@ -162,10 +162,6 @@ CHECKFLAGS += -D__arm__ > textofs-y := 0x00008000 > # RTD1195 has Boot ROM at start of address space > textofs-$(CONFIG_ARCH_REALTEK) := 0x00108000 > -# SA1111 DMA bug: we don't want the kernel to live in precious DMA-able memory > -ifeq ($(CONFIG_ARCH_SA1100),y) > -textofs-$(CONFIG_SA1111) := 0x00208000 > -endif > textofs-$(CONFIG_ARCH_QCOM_RESERVE_SMEM) := 0x00208000 > textofs-$(CONFIG_ARCH_MESON) := 0x00208000 > textofs-$(CONFIG_ARCH_AXXIA) := 0x00308000 > @@ -214,7 +210,6 @@ machine-$(CONFIG_ARCH_ROCKCHIP) += rockchip > machine-$(CONFIG_ARCH_RPC) += rpc > machine-$(CONFIG_PLAT_SAMSUNG) += s3c > machine-$(CONFIG_ARCH_S5PV210) += s5pv210 > -machine-$(CONFIG_ARCH_SA1100) += sa1100 > machine-$(CONFIG_ARCH_RENESAS) += shmobile > machine-$(CONFIG_ARCH_INTEL_SOCFPGA) += socfpga > machine-$(CONFIG_ARCH_STI) += sti > @@ -232,7 +227,6 @@ machine-$(CONFIG_PLAT_SPEAR) += spear > # these three are mutually exclusive > machdirs-$(CONFIG_ARCH_FOOTBRIDGE) += arch/arm/mach-footbridge > machdirs-$(CONFIG_ARCH_RPC) += arch/arm/mach-rpc > -machdirs-$(CONFIG_ARCH_SA1100) += arch/arm/mach-sa1100 > KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%/include,$(machdirs-y)) > > # The byte offset of the kernel image in RAM from the start of RAM. > diff --git a/arch/arm/boot/bootp/Makefile b/arch/arm/boot/bootp/Makefile > index f3443f7d7b02..a1a1f4bec783 100644 > --- a/arch/arm/boot/bootp/Makefile > +++ b/arch/arm/boot/bootp/Makefile > @@ -20,7 +20,6 @@ PARAMS_PHYS := $(call add_hex, $(PHYS_OFFSET), 0x100) > > # guess an initrd location if possible > initrd_offset-$(CONFIG_ARCH_FOOTBRIDGE) += 0x00800000 > -initrd_offset-$(CONFIG_ARCH_SA1100) += 0x00800000 > initrd_offset-$(CONFIG_ARCH_RPC) += 0x08000000 > INITRD_OFFSET := $(initrd_offset-y) > ifdef INITRD_OFFSET > diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile > index e3f550d62857..d8d81ba741a2 100644 > --- a/arch/arm/boot/compressed/Makefile > +++ b/arch/arm/boot/compressed/Makefile > @@ -29,10 +29,6 @@ ifeq ($(CONFIG_ARCH_ACORN),y) > OBJS += ll_char_wr.o font.o > endif > > -ifeq ($(CONFIG_ARCH_SA1100),y) > -OBJS += head-sa1100.o > -endif > - > ifeq ($(CONFIG_CPU_XSCALE),y) > OBJS += head-xscale.o > endif > diff --git a/arch/arm/boot/compressed/head-sa1100.S b/arch/arm/boot/compressed/head-sa1100.S > deleted file mode 100644 > index 23eae1a65064..000000000000 > --- a/arch/arm/boot/compressed/head-sa1100.S > +++ /dev/null > @@ -1,45 +0,0 @@ > -/* SPDX-License-Identifier: GPL-2.0 */ > -/* > - * linux/arch/arm/boot/compressed/head-sa1100.S > - * > - * Copyright (C) 1999 Nicolas Pitre > - * > - * SA1100 specific tweaks. This is merged into head.S by the linker. > - * > - */ > - > -#include > -#include > - > - .section ".start", "ax" > - .arch armv4 > - > -__SA1100_start: > - > - @ Preserve r8/r7 i.e. kernel entry values > -#ifdef CONFIG_SA1100_COLLIE > - mov r7, #MACH_TYPE_COLLIE > -#endif > - mrc p15, 0, r0, c1, c0, 0 @ read control reg > - ands r0, r0, #0x0d > - beq 99f > - > - @ Data cache might be active. > - @ Be sure to flush kernel binary out of the cache, > - @ whatever state it is, before it is turned off. > - @ This is done by fetching through currently executed > - @ memory to be sure we hit the same cache. > - bic r2, pc, #0x1f > - add r3, r2, #0x4000 @ 16 kb is quite enough... > -1: ldr r0, [r2], #32 > - teq r2, r3 > - bne 1b > - mcr p15, 0, r0, c7, c10, 4 @ drain WB > - mcr p15, 0, r0, c7, c7, 0 @ flush I & D caches > - > - @ disabling MMU and caches > - mrc p15, 0, r0, c1, c0, 0 @ read control reg > - bic r0, r0, #0x0d @ clear WB, DC, MMU > - bic r0, r0, #0x1000 @ clear Icache > - mcr p15, 0, r0, c1, c0, 0 > -99: > diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S > index 9f406e9c0ea6..845abffbc2d6 100644 > --- a/arch/arm/boot/compressed/head.S > +++ b/arch/arm/boot/compressed/head.S > @@ -64,17 +64,10 @@ > busyuart \tmp, \rb > .endm > > -#if defined(CONFIG_ARCH_SA1100) > - .macro loadsp, rb, tmp1, tmp2 > - mov \rb, #0x80000000 @ physical base address > - add \rb, \rb, #0x00010000 @ Ser1 > - .endm > -#else > .macro loadsp, rb, tmp1, tmp2 > addruart \rb, \tmp1, \tmp2 > .endm > #endif > -#endif > #endif > > .macro kputc,val > diff --git a/arch/arm/common/Kconfig b/arch/arm/common/Kconfig > index d2fdb1796f48..d72dccf6f3c2 100644 > --- a/arch/arm/common/Kconfig > +++ b/arch/arm/common/Kconfig > @@ -1,14 +1,7 @@ > # SPDX-License-Identifier: GPL-2.0 > -config SA1111 > - bool > - select ZONE_DMA if ARCH_SA1100 > - > config KRAIT_L2_ACCESSORS > bool > > -config SHARP_LOCOMO > - bool > - > config SHARP_PARAM > bool > > diff --git a/arch/arm/common/Makefile b/arch/arm/common/Makefile > index 9733381074e0..e1bcc250874f 100644 > --- a/arch/arm/common/Makefile > +++ b/arch/arm/common/Makefile > @@ -5,9 +5,7 @@ > > obj-y += firmware.o > > -obj-$(CONFIG_SA1111) += sa1111.o > obj-$(CONFIG_KRAIT_L2_ACCESSORS) += krait-l2-accessors.o > -obj-$(CONFIG_SHARP_LOCOMO) += locomo.o > obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o > obj-$(CONFIG_SHARP_SCOOP) += scoop.o > obj-$(CONFIG_CPU_V7) += secure_cntvoff.o > diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c > deleted file mode 100644 > index 55e360452828..000000000000 > --- a/arch/arm/common/locomo.c > +++ /dev/null > @@ -1,886 +0,0 @@ > -// SPDX-License-Identifier: GPL-2.0-only > -/* > - * linux/arch/arm/common/locomo.c > - * > - * Sharp LoCoMo support > - * > - * This file contains all generic LoCoMo support. > - * > - * All initialization functions provided here are intended to be called > - * from machine specific code with proper arguments when required. > - * > - * Based on sa1111.c > - */ > - > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > - > -#include > -#include > - > -#include > - > -/* LoCoMo Interrupts */ > -#define IRQ_LOCOMO_KEY (0) > -#define IRQ_LOCOMO_GPIO (1) > -#define IRQ_LOCOMO_LT (2) > -#define IRQ_LOCOMO_SPI (3) > - > -/* M62332 output channel selection */ > -#define M62332_EVR_CH 1 /* M62332 volume channel number */ > - /* 0 : CH.1 , 1 : CH. 2 */ > -/* DAC send data */ > -#define M62332_SLAVE_ADDR 0x4e /* Slave address */ > -#define M62332_W_BIT 0x00 /* W bit (0 only) */ > -#define M62332_SUB_ADDR 0x00 /* Sub address */ > -#define M62332_A_BIT 0x00 /* A bit (0 only) */ > - > -/* DAC setup and hold times (expressed in us) */ > -#define DAC_BUS_FREE_TIME 5 /* 4.7 us */ > -#define DAC_START_SETUP_TIME 5 /* 4.7 us */ > -#define DAC_STOP_SETUP_TIME 4 /* 4.0 us */ > -#define DAC_START_HOLD_TIME 5 /* 4.7 us */ > -#define DAC_SCL_LOW_HOLD_TIME 5 /* 4.7 us */ > -#define DAC_SCL_HIGH_HOLD_TIME 4 /* 4.0 us */ > -#define DAC_DATA_SETUP_TIME 1 /* 250 ns */ > -#define DAC_DATA_HOLD_TIME 1 /* 300 ns */ > -#define DAC_LOW_SETUP_TIME 1 /* 300 ns */ > -#define DAC_HIGH_SETUP_TIME 1 /* 1000 ns */ > - > -/* the following is the overall data for the locomo chip */ > -struct locomo { > - struct device *dev; > - unsigned long phys; > - unsigned int irq; > - int irq_base; > - spinlock_t lock; > - void __iomem *base; > -#ifdef CONFIG_PM > - void *saved_state; > -#endif > -}; > - > -static const struct bus_type locomo_bus_type; > - > -struct locomo_dev_info { > - unsigned long offset; > - unsigned long length; > - unsigned int devid; > - unsigned int irq[1]; > - const char * name; > -}; > - > -/* All the locomo devices. If offset is non-zero, the mapbase for the > - * locomo_dev will be set to the chip base plus offset. If offset is > - * zero, then the mapbase for the locomo_dev will be set to zero. An > - * offset of zero means the device only uses GPIOs or other helper > - * functions inside this file */ > -static struct locomo_dev_info locomo_devices[] = { > - { > - .devid = LOCOMO_DEVID_KEYBOARD, > - .irq = { IRQ_LOCOMO_KEY }, > - .name = "locomo-keyboard", > - .offset = LOCOMO_KEYBOARD, > - .length = 16, > - }, > - { > - .devid = LOCOMO_DEVID_FRONTLIGHT, > - .irq = {}, > - .name = "locomo-frontlight", > - .offset = LOCOMO_FRONTLIGHT, > - .length = 8, > - > - }, > - { > - .devid = LOCOMO_DEVID_BACKLIGHT, > - .irq = {}, > - .name = "locomo-backlight", > - .offset = LOCOMO_BACKLIGHT, > - .length = 8, > - }, > - { > - .devid = LOCOMO_DEVID_AUDIO, > - .irq = {}, > - .name = "locomo-audio", > - .offset = LOCOMO_AUDIO, > - .length = 4, > - }, > - { > - .devid = LOCOMO_DEVID_LED, > - .irq = {}, > - .name = "locomo-led", > - .offset = LOCOMO_LED, > - .length = 8, > - }, > - { > - .devid = LOCOMO_DEVID_UART, > - .irq = {}, > - .name = "locomo-uart", > - .offset = 0, > - .length = 0, > - }, > - { > - .devid = LOCOMO_DEVID_SPI, > - .irq = {}, > - .name = "locomo-spi", > - .offset = LOCOMO_SPI, > - .length = 0x30, > - }, > -}; > - > -static void locomo_handler(struct irq_desc *desc) > -{ > - struct locomo *lchip = irq_desc_get_handler_data(desc); > - int req, i; > - > - /* Acknowledge the parent IRQ */ > - desc->irq_data.chip->irq_ack(&desc->irq_data); > - > - /* check why this interrupt was generated */ > - req = locomo_readl(lchip->base + LOCOMO_ICR) & 0x0f00; > - > - if (req) { > - unsigned int irq; > - > - /* generate the next interrupt(s) */ > - irq = lchip->irq_base; > - for (i = 0; i <= 3; i++, irq++) { > - if (req & (0x0100 << i)) { > - generic_handle_irq(irq); > - } > - > - } > - } > -} > - > -static void locomo_ack_irq(struct irq_data *d) > -{ > -} > - > -static void locomo_mask_irq(struct irq_data *d) > -{ > - struct locomo *lchip = irq_data_get_irq_chip_data(d); > - unsigned int r; > - r = locomo_readl(lchip->base + LOCOMO_ICR); > - r &= ~(0x0010 << (d->irq - lchip->irq_base)); > - locomo_writel(r, lchip->base + LOCOMO_ICR); > -} > - > -static void locomo_unmask_irq(struct irq_data *d) > -{ > - struct locomo *lchip = irq_data_get_irq_chip_data(d); > - unsigned int r; > - r = locomo_readl(lchip->base + LOCOMO_ICR); > - r |= (0x0010 << (d->irq - lchip->irq_base)); > - locomo_writel(r, lchip->base + LOCOMO_ICR); > -} > - > -static struct irq_chip locomo_chip = { > - .name = "LOCOMO", > - .irq_ack = locomo_ack_irq, > - .irq_mask = locomo_mask_irq, > - .irq_unmask = locomo_unmask_irq, > -}; > - > -static void locomo_setup_irq(struct locomo *lchip) > -{ > - int irq = lchip->irq_base; > - > - /* > - * Install handler for IRQ_LOCOMO_HW. > - */ > - irq_set_irq_type(lchip->irq, IRQ_TYPE_EDGE_FALLING); > - irq_set_chained_handler_and_data(lchip->irq, locomo_handler, lchip); > - > - /* Install handlers for IRQ_LOCOMO_* */ > - for ( ; irq <= lchip->irq_base + 3; irq++) { > - irq_set_chip_and_handler(irq, &locomo_chip, handle_level_irq); > - irq_set_chip_data(irq, lchip); > - irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE); > - } > -} > - > - > -static void locomo_dev_release(struct device *_dev) > -{ > - struct locomo_dev *dev = LOCOMO_DEV(_dev); > - > - kfree(dev); > -} > - > -static int > -locomo_init_one_child(struct locomo *lchip, struct locomo_dev_info *info) > -{ > - struct locomo_dev *dev; > - int ret; > - > - dev = kzalloc_obj(struct locomo_dev); > - if (!dev) { > - ret = -ENOMEM; > - goto out; > - } > - > - /* > - * If the parent device has a DMA mask associated with it, > - * propagate it down to the children. > - */ > - if (lchip->dev->dma_mask) { > - dev->dma_mask = *lchip->dev->dma_mask; > - dev->dev.dma_mask = &dev->dma_mask; > - } > - > - dev_set_name(&dev->dev, "%s", info->name); > - dev->devid = info->devid; > - dev->dev.parent = lchip->dev; > - dev->dev.bus = &locomo_bus_type; > - dev->dev.release = locomo_dev_release; > - dev->dev.coherent_dma_mask = lchip->dev->coherent_dma_mask; > - > - if (info->offset) > - dev->mapbase = lchip->base + info->offset; > - else > - dev->mapbase = 0; > - dev->length = info->length; > - > - dev->irq[0] = (lchip->irq_base == NO_IRQ) ? > - NO_IRQ : lchip->irq_base + info->irq[0]; > - > - ret = device_register(&dev->dev); > - if (ret) { > - out: > - kfree(dev); > - } > - return ret; > -} > - > -#ifdef CONFIG_PM > - > -struct locomo_save_data { > - u16 LCM_GPO; > - u16 LCM_SPICT; > - u16 LCM_GPE; > - u16 LCM_ASD; > - u16 LCM_SPIMD; > -}; > - > -static int locomo_suspend(struct platform_device *dev, pm_message_t state) > -{ > - struct locomo *lchip = platform_get_drvdata(dev); > - struct locomo_save_data *save; > - unsigned long flags; > - > - save = kmalloc_obj(struct locomo_save_data); > - if (!save) > - return -ENOMEM; > - > - lchip->saved_state = save; > - > - spin_lock_irqsave(&lchip->lock, flags); > - > - save->LCM_GPO = locomo_readl(lchip->base + LOCOMO_GPO); /* GPIO */ > - locomo_writel(0x00, lchip->base + LOCOMO_GPO); > - save->LCM_SPICT = locomo_readl(lchip->base + LOCOMO_SPI + LOCOMO_SPICT); /* SPI */ > - locomo_writel(0x40, lchip->base + LOCOMO_SPI + LOCOMO_SPICT); > - save->LCM_GPE = locomo_readl(lchip->base + LOCOMO_GPE); /* GPIO */ > - locomo_writel(0x00, lchip->base + LOCOMO_GPE); > - save->LCM_ASD = locomo_readl(lchip->base + LOCOMO_ASD); /* ADSTART */ > - locomo_writel(0x00, lchip->base + LOCOMO_ASD); > - save->LCM_SPIMD = locomo_readl(lchip->base + LOCOMO_SPI + LOCOMO_SPIMD); /* SPI */ > - locomo_writel(0x3C14, lchip->base + LOCOMO_SPI + LOCOMO_SPIMD); > - > - locomo_writel(0x00, lchip->base + LOCOMO_PAIF); > - locomo_writel(0x00, lchip->base + LOCOMO_DAC); > - locomo_writel(0x00, lchip->base + LOCOMO_BACKLIGHT + LOCOMO_TC); > - > - if ((locomo_readl(lchip->base + LOCOMO_LED + LOCOMO_LPT0) & 0x88) && (locomo_readl(lchip->base + LOCOMO_LED + LOCOMO_LPT1) & 0x88)) > - locomo_writel(0x00, lchip->base + LOCOMO_C32K); /* CLK32 off */ > - else > - /* 18MHz already enabled, so no wait */ > - locomo_writel(0xc1, lchip->base + LOCOMO_C32K); /* CLK32 on */ > - > - locomo_writel(0x00, lchip->base + LOCOMO_TADC); /* 18MHz clock off*/ > - locomo_writel(0x00, lchip->base + LOCOMO_AUDIO + LOCOMO_ACC); /* 22MHz/24MHz clock off */ > - locomo_writel(0x00, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALS); /* FL */ > - > - spin_unlock_irqrestore(&lchip->lock, flags); > - > - return 0; > -} > - > -static int locomo_resume(struct platform_device *dev) > -{ > - struct locomo *lchip = platform_get_drvdata(dev); > - struct locomo_save_data *save; > - unsigned long r; > - unsigned long flags; > - > - save = lchip->saved_state; > - if (!save) > - return 0; > - > - spin_lock_irqsave(&lchip->lock, flags); > - > - locomo_writel(save->LCM_GPO, lchip->base + LOCOMO_GPO); > - locomo_writel(save->LCM_SPICT, lchip->base + LOCOMO_SPI + LOCOMO_SPICT); > - locomo_writel(save->LCM_GPE, lchip->base + LOCOMO_GPE); > - locomo_writel(save->LCM_ASD, lchip->base + LOCOMO_ASD); > - locomo_writel(save->LCM_SPIMD, lchip->base + LOCOMO_SPI + LOCOMO_SPIMD); > - > - locomo_writel(0x00, lchip->base + LOCOMO_C32K); > - locomo_writel(0x90, lchip->base + LOCOMO_TADC); > - > - locomo_writel(0, lchip->base + LOCOMO_KEYBOARD + LOCOMO_KSC); > - r = locomo_readl(lchip->base + LOCOMO_KEYBOARD + LOCOMO_KIC); > - r &= 0xFEFF; > - locomo_writel(r, lchip->base + LOCOMO_KEYBOARD + LOCOMO_KIC); > - locomo_writel(0x1, lchip->base + LOCOMO_KEYBOARD + LOCOMO_KCMD); > - > - spin_unlock_irqrestore(&lchip->lock, flags); > - > - lchip->saved_state = NULL; > - kfree(save); > - > - return 0; > -} > -#endif > - > -static int > -__locomo_probe(struct device *me, struct resource *mem, int irq) > -{ > - struct locomo_platform_data *pdata = me->platform_data; > - struct locomo *lchip; > - unsigned long r; > - int i, ret = -ENODEV; > - > - lchip = kzalloc_obj(struct locomo); > - if (!lchip) > - return -ENOMEM; > - > - spin_lock_init(&lchip->lock); > - > - lchip->dev = me; > - dev_set_drvdata(lchip->dev, lchip); > - > - lchip->phys = mem->start; > - lchip->irq = irq; > - lchip->irq_base = (pdata) ? pdata->irq_base : NO_IRQ; > - > - /* > - * Map the whole region. This also maps the > - * registers for our children. > - */ > - lchip->base = ioremap(mem->start, PAGE_SIZE); > - if (!lchip->base) { > - ret = -ENOMEM; > - goto out; > - } > - > - /* locomo initialize */ > - locomo_writel(0, lchip->base + LOCOMO_ICR); > - /* KEYBOARD */ > - locomo_writel(0, lchip->base + LOCOMO_KEYBOARD + LOCOMO_KIC); > - > - /* GPIO */ > - locomo_writel(0, lchip->base + LOCOMO_GPO); > - locomo_writel((LOCOMO_GPIO(1) | LOCOMO_GPIO(2) | LOCOMO_GPIO(13) | LOCOMO_GPIO(14)) > - , lchip->base + LOCOMO_GPE); > - locomo_writel((LOCOMO_GPIO(1) | LOCOMO_GPIO(2) | LOCOMO_GPIO(13) | LOCOMO_GPIO(14)) > - , lchip->base + LOCOMO_GPD); > - locomo_writel(0, lchip->base + LOCOMO_GIE); > - > - /* Frontlight */ > - locomo_writel(0, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALS); > - locomo_writel(0, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALD); > - > - /* Longtime timer */ > - locomo_writel(0, lchip->base + LOCOMO_LTINT); > - /* SPI */ > - locomo_writel(0, lchip->base + LOCOMO_SPI + LOCOMO_SPIIE); > - > - locomo_writel(6 + 8 + 320 + 30 - 10, lchip->base + LOCOMO_ASD); > - r = locomo_readl(lchip->base + LOCOMO_ASD); > - r |= 0x8000; > - locomo_writel(r, lchip->base + LOCOMO_ASD); > - > - locomo_writel(6 + 8 + 320 + 30 - 10 - 128 + 4, lchip->base + LOCOMO_HSD); > - r = locomo_readl(lchip->base + LOCOMO_HSD); > - r |= 0x8000; > - locomo_writel(r, lchip->base + LOCOMO_HSD); > - > - locomo_writel(128 / 8, lchip->base + LOCOMO_HSC); > - > - /* XON */ > - locomo_writel(0x80, lchip->base + LOCOMO_TADC); > - udelay(1000); > - /* CLK9MEN */ > - r = locomo_readl(lchip->base + LOCOMO_TADC); > - r |= 0x10; > - locomo_writel(r, lchip->base + LOCOMO_TADC); > - udelay(100); > - > - /* init DAC */ > - r = locomo_readl(lchip->base + LOCOMO_DAC); > - r |= LOCOMO_DAC_SCLOEB | LOCOMO_DAC_SDAOEB; > - locomo_writel(r, lchip->base + LOCOMO_DAC); > - > - r = locomo_readl(lchip->base + LOCOMO_VER); > - printk(KERN_INFO "LoCoMo Chip: %lu%lu\n", (r >> 8), (r & 0xff)); > - > - /* > - * The interrupt controller must be initialised before any > - * other device to ensure that the interrupts are available. > - */ > - if (lchip->irq != NO_IRQ && lchip->irq_base != NO_IRQ) > - locomo_setup_irq(lchip); > - > - for (i = 0; i < ARRAY_SIZE(locomo_devices); i++) > - locomo_init_one_child(lchip, &locomo_devices[i]); > - return 0; > - > - out: > - kfree(lchip); > - return ret; > -} > - > -static int locomo_remove_child(struct device *dev, void *data) > -{ > - device_unregister(dev); > - return 0; > -} > - > -static void __locomo_remove(struct locomo *lchip) > -{ > - device_for_each_child(lchip->dev, NULL, locomo_remove_child); > - > - if (lchip->irq != NO_IRQ) { > - irq_set_chained_handler_and_data(lchip->irq, NULL, NULL); > - } > - > - iounmap(lchip->base); > - kfree(lchip); > -} > - > -/** > - * locomo_probe - probe for a single LoCoMo chip. > - * @dev: platform device > - * > - * Probe for a LoCoMo chip. This must be called > - * before any other locomo-specific code. > - * > - * Returns: > - * * %-EINVAL - device's IORESOURCE_MEM not found > - * * %-ENXIO - could not allocate an IRQ for the device > - * * %-ENODEV - device not found. > - * * %-EBUSY - physical address already marked in-use. > - * * %-ENOMEM - could not allocate or iomap memory. > - * * %0 - successful. > - */ > -static int locomo_probe(struct platform_device *dev) > -{ > - struct resource *mem; > - int irq; > - > - mem = platform_get_resource(dev, IORESOURCE_MEM, 0); > - if (!mem) > - return -EINVAL; > - irq = platform_get_irq(dev, 0); > - if (irq < 0) > - return -ENXIO; > - > - return __locomo_probe(&dev->dev, mem, irq); > -} > - > -static void locomo_remove(struct platform_device *dev) > -{ > - struct locomo *lchip = platform_get_drvdata(dev); > - > - if (lchip) { > - __locomo_remove(lchip); > - platform_set_drvdata(dev, NULL); > - } > -} > - > -/* > - * Not sure if this should be on the system bus or not yet. > - * We really want some way to register a system device at > - * the per-machine level, and then have this driver pick > - * up the registered devices. > - */ > -static struct platform_driver locomo_device_driver = { > - .probe = locomo_probe, > - .remove = locomo_remove, > -#ifdef CONFIG_PM > - .suspend = locomo_suspend, > - .resume = locomo_resume, > -#endif > - .driver = { > - .name = "locomo", > - }, > -}; > - > -/* > - * Get the parent device driver (us) structure > - * from a child function device > - */ > -static inline struct locomo *locomo_chip_driver(struct locomo_dev *ldev) > -{ > - return (struct locomo *)dev_get_drvdata(ldev->dev.parent); > -} > - > -void locomo_gpio_set_dir(struct device *dev, unsigned int bits, unsigned int dir) > -{ > - struct locomo *lchip = dev_get_drvdata(dev); > - unsigned long flags; > - unsigned int r; > - > - if (!lchip) > - return; > - > - spin_lock_irqsave(&lchip->lock, flags); > - > - r = locomo_readl(lchip->base + LOCOMO_GPD); > - if (dir) > - r |= bits; > - else > - r &= ~bits; > - locomo_writel(r, lchip->base + LOCOMO_GPD); > - > - r = locomo_readl(lchip->base + LOCOMO_GPE); > - if (dir) > - r |= bits; > - else > - r &= ~bits; > - locomo_writel(r, lchip->base + LOCOMO_GPE); > - > - spin_unlock_irqrestore(&lchip->lock, flags); > -} > -EXPORT_SYMBOL(locomo_gpio_set_dir); > - > -int locomo_gpio_read_level(struct device *dev, unsigned int bits) > -{ > - struct locomo *lchip = dev_get_drvdata(dev); > - unsigned long flags; > - unsigned int ret; > - > - if (!lchip) > - return -ENODEV; > - > - spin_lock_irqsave(&lchip->lock, flags); > - ret = locomo_readl(lchip->base + LOCOMO_GPL); > - spin_unlock_irqrestore(&lchip->lock, flags); > - > - ret &= bits; > - return ret; > -} > -EXPORT_SYMBOL(locomo_gpio_read_level); > - > -int locomo_gpio_read_output(struct device *dev, unsigned int bits) > -{ > - struct locomo *lchip = dev_get_drvdata(dev); > - unsigned long flags; > - unsigned int ret; > - > - if (!lchip) > - return -ENODEV; > - > - spin_lock_irqsave(&lchip->lock, flags); > - ret = locomo_readl(lchip->base + LOCOMO_GPO); > - spin_unlock_irqrestore(&lchip->lock, flags); > - > - ret &= bits; > - return ret; > -} > -EXPORT_SYMBOL(locomo_gpio_read_output); > - > -void locomo_gpio_write(struct device *dev, unsigned int bits, unsigned int set) > -{ > - struct locomo *lchip = dev_get_drvdata(dev); > - unsigned long flags; > - unsigned int r; > - > - if (!lchip) > - return; > - > - spin_lock_irqsave(&lchip->lock, flags); > - > - r = locomo_readl(lchip->base + LOCOMO_GPO); > - if (set) > - r |= bits; > - else > - r &= ~bits; > - locomo_writel(r, lchip->base + LOCOMO_GPO); > - > - spin_unlock_irqrestore(&lchip->lock, flags); > -} > -EXPORT_SYMBOL(locomo_gpio_write); > - > -static void locomo_m62332_sendbit(void *mapbase, int bit) > -{ > - unsigned int r; > - > - r = locomo_readl(mapbase + LOCOMO_DAC); > - r &= ~(LOCOMO_DAC_SCLOEB); > - locomo_writel(r, mapbase + LOCOMO_DAC); > - udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ > - udelay(DAC_DATA_HOLD_TIME); /* 300 nsec */ > - r = locomo_readl(mapbase + LOCOMO_DAC); > - r &= ~(LOCOMO_DAC_SCLOEB); > - locomo_writel(r, mapbase + LOCOMO_DAC); > - udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ > - udelay(DAC_SCL_LOW_HOLD_TIME); /* 4.7 usec */ > - > - if (bit & 1) { > - r = locomo_readl(mapbase + LOCOMO_DAC); > - r |= LOCOMO_DAC_SDAOEB; > - locomo_writel(r, mapbase + LOCOMO_DAC); > - udelay(DAC_HIGH_SETUP_TIME); /* 1000 nsec */ > - } else { > - r = locomo_readl(mapbase + LOCOMO_DAC); > - r &= ~(LOCOMO_DAC_SDAOEB); > - locomo_writel(r, mapbase + LOCOMO_DAC); > - udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ > - } > - > - udelay(DAC_DATA_SETUP_TIME); /* 250 nsec */ > - r = locomo_readl(mapbase + LOCOMO_DAC); > - r |= LOCOMO_DAC_SCLOEB; > - locomo_writel(r, mapbase + LOCOMO_DAC); > - udelay(DAC_HIGH_SETUP_TIME); /* 1000 nsec */ > - udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.0 usec */ > -} > - > -void locomo_m62332_senddata(struct locomo_dev *ldev, unsigned int dac_data, int channel) > -{ > - struct locomo *lchip = locomo_chip_driver(ldev); > - int i; > - unsigned char data; > - unsigned int r; > - void *mapbase = lchip->base; > - unsigned long flags; > - > - spin_lock_irqsave(&lchip->lock, flags); > - > - /* Start */ > - udelay(DAC_BUS_FREE_TIME); /* 5.0 usec */ > - r = locomo_readl(mapbase + LOCOMO_DAC); > - r |= LOCOMO_DAC_SCLOEB | LOCOMO_DAC_SDAOEB; > - locomo_writel(r, mapbase + LOCOMO_DAC); > - udelay(DAC_HIGH_SETUP_TIME); /* 1000 nsec */ > - udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.0 usec */ > - r = locomo_readl(mapbase + LOCOMO_DAC); > - r &= ~(LOCOMO_DAC_SDAOEB); > - locomo_writel(r, mapbase + LOCOMO_DAC); > - udelay(DAC_START_HOLD_TIME); /* 5.0 usec */ > - udelay(DAC_DATA_HOLD_TIME); /* 300 nsec */ > - > - /* Send slave address and W bit (LSB is W bit) */ > - data = (M62332_SLAVE_ADDR << 1) | M62332_W_BIT; > - for (i = 1; i <= 8; i++) { > - locomo_m62332_sendbit(mapbase, data >> (8 - i)); > - } > - > - /* Check A bit */ > - r = locomo_readl(mapbase + LOCOMO_DAC); > - r &= ~(LOCOMO_DAC_SCLOEB); > - locomo_writel(r, mapbase + LOCOMO_DAC); > - udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ > - udelay(DAC_SCL_LOW_HOLD_TIME); /* 4.7 usec */ > - r = locomo_readl(mapbase + LOCOMO_DAC); > - r &= ~(LOCOMO_DAC_SDAOEB); > - locomo_writel(r, mapbase + LOCOMO_DAC); > - udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ > - r = locomo_readl(mapbase + LOCOMO_DAC); > - r |= LOCOMO_DAC_SCLOEB; > - locomo_writel(r, mapbase + LOCOMO_DAC); > - udelay(DAC_HIGH_SETUP_TIME); /* 1000 nsec */ > - udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.7 usec */ > - if (locomo_readl(mapbase + LOCOMO_DAC) & LOCOMO_DAC_SDAOEB) { /* High is error */ > - printk(KERN_WARNING "locomo: m62332_senddata Error 1\n"); > - goto out; > - } > - > - /* Send Sub address (LSB is channel select) */ > - /* channel = 0 : ch1 select */ > - /* = 1 : ch2 select */ > - data = M62332_SUB_ADDR + channel; > - for (i = 1; i <= 8; i++) { > - locomo_m62332_sendbit(mapbase, data >> (8 - i)); > - } > - > - /* Check A bit */ > - r = locomo_readl(mapbase + LOCOMO_DAC); > - r &= ~(LOCOMO_DAC_SCLOEB); > - locomo_writel(r, mapbase + LOCOMO_DAC); > - udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ > - udelay(DAC_SCL_LOW_HOLD_TIME); /* 4.7 usec */ > - r = locomo_readl(mapbase + LOCOMO_DAC); > - r &= ~(LOCOMO_DAC_SDAOEB); > - locomo_writel(r, mapbase + LOCOMO_DAC); > - udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ > - r = locomo_readl(mapbase + LOCOMO_DAC); > - r |= LOCOMO_DAC_SCLOEB; > - locomo_writel(r, mapbase + LOCOMO_DAC); > - udelay(DAC_HIGH_SETUP_TIME); /* 1000 nsec */ > - udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.7 usec */ > - if (locomo_readl(mapbase + LOCOMO_DAC) & LOCOMO_DAC_SDAOEB) { /* High is error */ > - printk(KERN_WARNING "locomo: m62332_senddata Error 2\n"); > - goto out; > - } > - > - /* Send DAC data */ > - for (i = 1; i <= 8; i++) { > - locomo_m62332_sendbit(mapbase, dac_data >> (8 - i)); > - } > - > - /* Check A bit */ > - r = locomo_readl(mapbase + LOCOMO_DAC); > - r &= ~(LOCOMO_DAC_SCLOEB); > - locomo_writel(r, mapbase + LOCOMO_DAC); > - udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ > - udelay(DAC_SCL_LOW_HOLD_TIME); /* 4.7 usec */ > - r = locomo_readl(mapbase + LOCOMO_DAC); > - r &= ~(LOCOMO_DAC_SDAOEB); > - locomo_writel(r, mapbase + LOCOMO_DAC); > - udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ > - r = locomo_readl(mapbase + LOCOMO_DAC); > - r |= LOCOMO_DAC_SCLOEB; > - locomo_writel(r, mapbase + LOCOMO_DAC); > - udelay(DAC_HIGH_SETUP_TIME); /* 1000 nsec */ > - udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.7 usec */ > - if (locomo_readl(mapbase + LOCOMO_DAC) & LOCOMO_DAC_SDAOEB) { /* High is error */ > - printk(KERN_WARNING "locomo: m62332_senddata Error 3\n"); > - } > - > -out: > - /* stop */ > - r = locomo_readl(mapbase + LOCOMO_DAC); > - r &= ~(LOCOMO_DAC_SCLOEB); > - locomo_writel(r, mapbase + LOCOMO_DAC); > - udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ > - udelay(DAC_SCL_LOW_HOLD_TIME); /* 4.7 usec */ > - r = locomo_readl(mapbase + LOCOMO_DAC); > - r |= LOCOMO_DAC_SCLOEB; > - locomo_writel(r, mapbase + LOCOMO_DAC); > - udelay(DAC_HIGH_SETUP_TIME); /* 1000 nsec */ > - udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4 usec */ > - r = locomo_readl(mapbase + LOCOMO_DAC); > - r |= LOCOMO_DAC_SDAOEB; > - locomo_writel(r, mapbase + LOCOMO_DAC); > - udelay(DAC_HIGH_SETUP_TIME); /* 1000 nsec */ > - udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4 usec */ > - > - r = locomo_readl(mapbase + LOCOMO_DAC); > - r |= LOCOMO_DAC_SCLOEB | LOCOMO_DAC_SDAOEB; > - locomo_writel(r, mapbase + LOCOMO_DAC); > - udelay(DAC_LOW_SETUP_TIME); /* 1000 nsec */ > - udelay(DAC_SCL_LOW_HOLD_TIME); /* 4.7 usec */ > - > - spin_unlock_irqrestore(&lchip->lock, flags); > -} > -EXPORT_SYMBOL(locomo_m62332_senddata); > - > -/* > - * Frontlight control > - */ > - > -void locomo_frontlight_set(struct locomo_dev *dev, int duty, int vr, int bpwf) > -{ > - unsigned long flags; > - struct locomo *lchip = locomo_chip_driver(dev); > - > - if (vr) > - locomo_gpio_write(dev->dev.parent, LOCOMO_GPIO_FL_VR, 1); > - else > - locomo_gpio_write(dev->dev.parent, LOCOMO_GPIO_FL_VR, 0); > - > - spin_lock_irqsave(&lchip->lock, flags); > - locomo_writel(bpwf, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALS); > - udelay(100); > - locomo_writel(duty, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALD); > - locomo_writel(bpwf | LOCOMO_ALC_EN, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALS); > - spin_unlock_irqrestore(&lchip->lock, flags); > -} > -EXPORT_SYMBOL(locomo_frontlight_set); > - > -/* > - * LoCoMo "Register Access Bus." > - * > - * We model this as a regular bus type, and hang devices directly > - * off this. > - */ > -static int locomo_match(struct device *_dev, const struct device_driver *_drv) > -{ > - struct locomo_dev *dev = LOCOMO_DEV(_dev); > - const struct locomo_driver *drv = LOCOMO_DRV(_drv); > - > - return dev->devid == drv->devid; > -} > - > -static int locomo_bus_probe(struct device *dev) > -{ > - struct locomo_dev *ldev = LOCOMO_DEV(dev); > - struct locomo_driver *drv = LOCOMO_DRV(dev->driver); > - int ret = -ENODEV; > - > - if (drv->probe) > - ret = drv->probe(ldev); > - return ret; > -} > - > -static void locomo_bus_remove(struct device *dev) > -{ > - struct locomo_dev *ldev = LOCOMO_DEV(dev); > - struct locomo_driver *drv = LOCOMO_DRV(dev->driver); > - > - if (drv->remove) > - drv->remove(ldev); > -} > - > -static const struct bus_type locomo_bus_type = { > - .name = "locomo-bus", > - .match = locomo_match, > - .probe = locomo_bus_probe, > - .remove = locomo_bus_remove, > -}; > - > -int locomo_driver_register(struct locomo_driver *driver) > -{ > - driver->drv.bus = &locomo_bus_type; > - return driver_register(&driver->drv); > -} > -EXPORT_SYMBOL(locomo_driver_register); > - > -void locomo_driver_unregister(struct locomo_driver *driver) > -{ > - driver_unregister(&driver->drv); > -} > -EXPORT_SYMBOL(locomo_driver_unregister); > - > -static int __init locomo_init(void) > -{ > - int ret = bus_register(&locomo_bus_type); > - if (ret == 0) > - platform_driver_register(&locomo_device_driver); > - return ret; > -} > - > -static void __exit locomo_exit(void) > -{ > - platform_driver_unregister(&locomo_device_driver); > - bus_unregister(&locomo_bus_type); > -} > - > -module_init(locomo_init); > -module_exit(locomo_exit); > - > -MODULE_DESCRIPTION("Sharp LoCoMo core driver"); > -MODULE_LICENSE("GPL"); > -MODULE_AUTHOR("John Lenz "); > diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c > deleted file mode 100644 > index a0f854cf4748..000000000000 > --- a/arch/arm/common/sa1111.c > +++ /dev/null > @@ -1,1413 +0,0 @@ > -// SPDX-License-Identifier: GPL-2.0-only > -/* > - * linux/arch/arm/common/sa1111.c > - * > - * SA1111 support > - * > - * Original code by John Dorsey > - * > - * This file contains all generic SA1111 support. > - * > - * All initialization functions provided here are intended to be called > - * from machine specific code with proper arguments when required. > - */ > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > - > -#include > -#include > -#include > - > -#include > - > -#ifdef CONFIG_ARCH_SA1100 > -#include > -#endif > - > -/* SA1111 IRQs */ > -#define IRQ_GPAIN0 (0) > -#define IRQ_GPAIN1 (1) > -#define IRQ_GPAIN2 (2) > -#define IRQ_GPAIN3 (3) > -#define IRQ_GPBIN0 (4) > -#define IRQ_GPBIN1 (5) > -#define IRQ_GPBIN2 (6) > -#define IRQ_GPBIN3 (7) > -#define IRQ_GPBIN4 (8) > -#define IRQ_GPBIN5 (9) > -#define IRQ_GPCIN0 (10) > -#define IRQ_GPCIN1 (11) > -#define IRQ_GPCIN2 (12) > -#define IRQ_GPCIN3 (13) > -#define IRQ_GPCIN4 (14) > -#define IRQ_GPCIN5 (15) > -#define IRQ_GPCIN6 (16) > -#define IRQ_GPCIN7 (17) > -#define IRQ_MSTXINT (18) > -#define IRQ_MSRXINT (19) > -#define IRQ_MSSTOPERRINT (20) > -#define IRQ_TPTXINT (21) > -#define IRQ_TPRXINT (22) > -#define IRQ_TPSTOPERRINT (23) > -#define SSPXMTINT (24) > -#define SSPRCVINT (25) > -#define SSPROR (26) > -#define AUDXMTDMADONEA (32) > -#define AUDRCVDMADONEA (33) > -#define AUDXMTDMADONEB (34) > -#define AUDRCVDMADONEB (35) > -#define AUDTFSR (36) > -#define AUDRFSR (37) > -#define AUDTUR (38) > -#define AUDROR (39) > -#define AUDDTS (40) > -#define AUDRDD (41) > -#define AUDSTO (42) > -#define IRQ_USBPWR (43) > -#define IRQ_HCIM (44) > -#define IRQ_HCIBUFFACC (45) > -#define IRQ_HCIRMTWKP (46) > -#define IRQ_NHCIMFCIR (47) > -#define IRQ_USB_PORT_RESUME (48) > -#define IRQ_S0_READY_NINT (49) > -#define IRQ_S1_READY_NINT (50) > -#define IRQ_S0_CD_VALID (51) > -#define IRQ_S1_CD_VALID (52) > -#define IRQ_S0_BVD1_STSCHG (53) > -#define IRQ_S1_BVD1_STSCHG (54) > -#define SA1111_IRQ_NR (55) > - > -extern void sa1110_mb_enable(void); > -extern void sa1110_mb_disable(void); > - > -/* > - * We keep the following data for the overall SA1111. Note that the > - * struct device and struct resource are "fake"; they should be supplied > - * by the bus above us. However, in the interests of getting all SA1111 > - * drivers converted over to the device model, we provide this as an > - * anchor point for all the other drivers. > - */ > -struct sa1111 { > - struct device *dev; > - struct clk *clk; > - unsigned long phys; > - int irq; > - int irq_base; /* base for cascaded on-chip IRQs */ > - spinlock_t lock; > - void __iomem *base; > - struct sa1111_platform_data *pdata; > - struct irq_domain *irqdomain; > - struct gpio_chip gc; > -#ifdef CONFIG_PM > - void *saved_state; > -#endif > -}; > - > -/* > - * We _really_ need to eliminate this. Its only users > - * are the PWM and DMA checking code. > - */ > -static struct sa1111 *g_sa1111; > - > -struct sa1111_dev_info { > - unsigned long offset; > - unsigned long skpcr_mask; > - bool dma; > - unsigned int devid; > - unsigned int hwirq[6]; > -}; > - > -static struct sa1111_dev_info sa1111_devices[] = { > - { > - .offset = SA1111_USB, > - .skpcr_mask = SKPCR_UCLKEN, > - .dma = true, > - .devid = SA1111_DEVID_USB, > - .hwirq = { > - IRQ_USBPWR, > - IRQ_HCIM, > - IRQ_HCIBUFFACC, > - IRQ_HCIRMTWKP, > - IRQ_NHCIMFCIR, > - IRQ_USB_PORT_RESUME > - }, > - }, > - { > - .offset = 0x0600, > - .skpcr_mask = SKPCR_I2SCLKEN | SKPCR_L3CLKEN, > - .dma = true, > - .devid = SA1111_DEVID_SAC, > - .hwirq = { > - AUDXMTDMADONEA, > - AUDXMTDMADONEB, > - AUDRCVDMADONEA, > - AUDRCVDMADONEB > - }, > - }, > - { > - .offset = 0x0800, > - .skpcr_mask = SKPCR_SCLKEN, > - .devid = SA1111_DEVID_SSP, > - }, > - { > - .offset = SA1111_KBD, > - .skpcr_mask = SKPCR_PTCLKEN, > - .devid = SA1111_DEVID_PS2_KBD, > - .hwirq = { > - IRQ_TPRXINT, > - IRQ_TPTXINT > - }, > - }, > - { > - .offset = SA1111_MSE, > - .skpcr_mask = SKPCR_PMCLKEN, > - .devid = SA1111_DEVID_PS2_MSE, > - .hwirq = { > - IRQ_MSRXINT, > - IRQ_MSTXINT > - }, > - }, > - { > - .offset = 0x1800, > - .skpcr_mask = 0, > - .devid = SA1111_DEVID_PCMCIA, > - .hwirq = { > - IRQ_S0_READY_NINT, > - IRQ_S0_CD_VALID, > - IRQ_S0_BVD1_STSCHG, > - IRQ_S1_READY_NINT, > - IRQ_S1_CD_VALID, > - IRQ_S1_BVD1_STSCHG, > - }, > - }, > -}; > - > -static int sa1111_map_irq(struct sa1111 *sachip, irq_hw_number_t hwirq) > -{ > - return irq_create_mapping(sachip->irqdomain, hwirq); > -} > - > -/* > - * SA1111 interrupt support. Since clearing an IRQ while there are > - * active IRQs causes the interrupt output to pulse, the upper levels > - * will call us again if there are more interrupts to process. > - */ > -static void sa1111_irq_handler(struct irq_desc *desc) > -{ > - unsigned int stat0, stat1, i; > - struct sa1111 *sachip = irq_desc_get_handler_data(desc); > - struct irq_domain *irqdomain; > - void __iomem *mapbase = sachip->base + SA1111_INTC; > - > - stat0 = readl_relaxed(mapbase + SA1111_INTSTATCLR0); > - stat1 = readl_relaxed(mapbase + SA1111_INTSTATCLR1); > - > - writel_relaxed(stat0, mapbase + SA1111_INTSTATCLR0); > - > - desc->irq_data.chip->irq_ack(&desc->irq_data); > - > - writel_relaxed(stat1, mapbase + SA1111_INTSTATCLR1); > - > - if (stat0 == 0 && stat1 == 0) { > - handle_bad_irq(desc); > - return; > - } > - > - irqdomain = sachip->irqdomain; > - > - for (i = 0; stat0; i++, stat0 >>= 1) > - if (stat0 & 1) > - generic_handle_domain_irq(irqdomain, i); > - > - for (i = 32; stat1; i++, stat1 >>= 1) > - if (stat1 & 1) > - generic_handle_domain_irq(irqdomain, i); > - > - /* For level-based interrupts */ > - desc->irq_data.chip->irq_unmask(&desc->irq_data); > -} > - > -static u32 sa1111_irqmask(struct irq_data *d) > -{ > - return BIT(irqd_to_hwirq(d) & 31); > -} > - > -static int sa1111_irqbank(struct irq_data *d) > -{ > - return (irqd_to_hwirq(d) / 32) * 4; > -} > - > -static void sa1111_ack_irq(struct irq_data *d) > -{ > -} > - > -static void sa1111_mask_irq(struct irq_data *d) > -{ > - struct sa1111 *sachip = irq_data_get_irq_chip_data(d); > - void __iomem *mapbase = sachip->base + SA1111_INTC + sa1111_irqbank(d); > - u32 ie; > - > - ie = readl_relaxed(mapbase + SA1111_INTEN0); > - ie &= ~sa1111_irqmask(d); > - writel(ie, mapbase + SA1111_INTEN0); > -} > - > -static void sa1111_unmask_irq(struct irq_data *d) > -{ > - struct sa1111 *sachip = irq_data_get_irq_chip_data(d); > - void __iomem *mapbase = sachip->base + SA1111_INTC + sa1111_irqbank(d); > - u32 ie; > - > - ie = readl_relaxed(mapbase + SA1111_INTEN0); > - ie |= sa1111_irqmask(d); > - writel_relaxed(ie, mapbase + SA1111_INTEN0); > -} > - > -/* > - * Attempt to re-trigger the interrupt. The SA1111 contains a register > - * (INTSET) which claims to do this. However, in practice no amount of > - * manipulation of INTEN and INTSET guarantees that the interrupt will > - * be triggered. In fact, its very difficult, if not impossible to get > - * INTSET to re-trigger the interrupt. > - */ > -static int sa1111_retrigger_irq(struct irq_data *d) > -{ > - struct sa1111 *sachip = irq_data_get_irq_chip_data(d); > - void __iomem *mapbase = sachip->base + SA1111_INTC + sa1111_irqbank(d); > - u32 ip, mask = sa1111_irqmask(d); > - int i; > - > - ip = readl_relaxed(mapbase + SA1111_INTPOL0); > - for (i = 0; i < 8; i++) { > - writel_relaxed(ip ^ mask, mapbase + SA1111_INTPOL0); > - writel_relaxed(ip, mapbase + SA1111_INTPOL0); > - if (readl_relaxed(mapbase + SA1111_INTSTATCLR0) & mask) > - break; > - } > - > - if (i == 8) { > - pr_err("Danger Will Robinson: failed to re-trigger IRQ%d\n", > - d->irq); > - return 0; > - } > - > - return 1; > -} > - > -static int sa1111_type_irq(struct irq_data *d, unsigned int flags) > -{ > - struct sa1111 *sachip = irq_data_get_irq_chip_data(d); > - void __iomem *mapbase = sachip->base + SA1111_INTC + sa1111_irqbank(d); > - u32 ip, mask = sa1111_irqmask(d); > - > - if (flags == IRQ_TYPE_PROBE) > - return 0; > - > - if ((!(flags & IRQ_TYPE_EDGE_RISING) ^ !(flags & IRQ_TYPE_EDGE_FALLING)) == 0) > - return -EINVAL; > - > - ip = readl_relaxed(mapbase + SA1111_INTPOL0); > - if (flags & IRQ_TYPE_EDGE_RISING) > - ip &= ~mask; > - else > - ip |= mask; > - writel_relaxed(ip, mapbase + SA1111_INTPOL0); > - writel_relaxed(ip, mapbase + SA1111_WAKEPOL0); > - > - return 0; > -} > - > -static int sa1111_wake_irq(struct irq_data *d, unsigned int on) > -{ > - struct sa1111 *sachip = irq_data_get_irq_chip_data(d); > - void __iomem *mapbase = sachip->base + SA1111_INTC + sa1111_irqbank(d); > - u32 we, mask = sa1111_irqmask(d); > - > - we = readl_relaxed(mapbase + SA1111_WAKEEN0); > - if (on) > - we |= mask; > - else > - we &= ~mask; > - writel_relaxed(we, mapbase + SA1111_WAKEEN0); > - > - return 0; > -} > - > -static struct irq_chip sa1111_irq_chip = { > - .name = "SA1111", > - .irq_ack = sa1111_ack_irq, > - .irq_mask = sa1111_mask_irq, > - .irq_unmask = sa1111_unmask_irq, > - .irq_retrigger = sa1111_retrigger_irq, > - .irq_set_type = sa1111_type_irq, > - .irq_set_wake = sa1111_wake_irq, > -}; > - > -static int sa1111_irqdomain_map(struct irq_domain *d, unsigned int irq, > - irq_hw_number_t hwirq) > -{ > - struct sa1111 *sachip = d->host_data; > - > - /* Disallow unavailable interrupts */ > - if (hwirq > SSPROR && hwirq < AUDXMTDMADONEA) > - return -EINVAL; > - > - irq_set_chip_data(irq, sachip); > - irq_set_chip_and_handler(irq, &sa1111_irq_chip, handle_edge_irq); > - irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE); > - > - return 0; > -} > - > -static const struct irq_domain_ops sa1111_irqdomain_ops = { > - .map = sa1111_irqdomain_map, > - .xlate = irq_domain_xlate_twocell, > -}; > - > -static int sa1111_setup_irq(struct sa1111 *sachip, unsigned irq_base) > -{ > - void __iomem *irqbase = sachip->base + SA1111_INTC; > - int ret; > - > - /* > - * We're guaranteed that this region hasn't been taken. > - */ > - request_mem_region(sachip->phys + SA1111_INTC, 512, "irq"); > - > - ret = irq_alloc_descs(-1, irq_base, SA1111_IRQ_NR, -1); > - if (ret <= 0) { > - dev_err(sachip->dev, "unable to allocate %u irqs: %d\n", > - SA1111_IRQ_NR, ret); > - if (ret == 0) > - ret = -EINVAL; > - return ret; > - } > - > - sachip->irq_base = ret; > - > - /* disable all IRQs */ > - writel_relaxed(0, irqbase + SA1111_INTEN0); > - writel_relaxed(0, irqbase + SA1111_INTEN1); > - writel_relaxed(0, irqbase + SA1111_WAKEEN0); > - writel_relaxed(0, irqbase + SA1111_WAKEEN1); > - > - /* > - * detect on rising edge. Note: Feb 2001 Errata for SA1111 > - * specifies that S0ReadyInt and S1ReadyInt should be '1'. > - */ > - writel_relaxed(0, irqbase + SA1111_INTPOL0); > - writel_relaxed(BIT(IRQ_S0_READY_NINT & 31) | > - BIT(IRQ_S1_READY_NINT & 31), > - irqbase + SA1111_INTPOL1); > - > - /* clear all IRQs */ > - writel_relaxed(~0, irqbase + SA1111_INTSTATCLR0); > - writel_relaxed(~0, irqbase + SA1111_INTSTATCLR1); > - > - sachip->irqdomain = irq_domain_create_linear(NULL, SA1111_IRQ_NR, > - &sa1111_irqdomain_ops, > - sachip); > - if (!sachip->irqdomain) { > - irq_free_descs(sachip->irq_base, SA1111_IRQ_NR); > - return -ENOMEM; > - } > - > - irq_domain_associate_many(sachip->irqdomain, > - sachip->irq_base + IRQ_GPAIN0, > - IRQ_GPAIN0, SSPROR + 1 - IRQ_GPAIN0); > - irq_domain_associate_many(sachip->irqdomain, > - sachip->irq_base + AUDXMTDMADONEA, > - AUDXMTDMADONEA, > - IRQ_S1_BVD1_STSCHG + 1 - AUDXMTDMADONEA); > - > - /* > - * Register SA1111 interrupt > - */ > - irq_set_irq_type(sachip->irq, IRQ_TYPE_EDGE_RISING); > - irq_set_chained_handler_and_data(sachip->irq, sa1111_irq_handler, > - sachip); > - > - dev_info(sachip->dev, "Providing IRQ%u-%u\n", > - sachip->irq_base, sachip->irq_base + SA1111_IRQ_NR - 1); > - > - return 0; > -} > - > -static void sa1111_remove_irq(struct sa1111 *sachip) > -{ > - struct irq_domain *domain = sachip->irqdomain; > - void __iomem *irqbase = sachip->base + SA1111_INTC; > - int i; > - > - /* disable all IRQs */ > - writel_relaxed(0, irqbase + SA1111_INTEN0); > - writel_relaxed(0, irqbase + SA1111_INTEN1); > - writel_relaxed(0, irqbase + SA1111_WAKEEN0); > - writel_relaxed(0, irqbase + SA1111_WAKEEN1); > - > - irq_set_chained_handler_and_data(sachip->irq, NULL, NULL); > - for (i = 0; i < SA1111_IRQ_NR; i++) > - irq_dispose_mapping(irq_find_mapping(domain, i)); > - irq_domain_remove(domain); > - > - release_mem_region(sachip->phys + SA1111_INTC, 512); > -} > - > -enum { > - SA1111_GPIO_PXDDR = (SA1111_GPIO_PADDR - SA1111_GPIO_PADDR), > - SA1111_GPIO_PXDRR = (SA1111_GPIO_PADRR - SA1111_GPIO_PADDR), > - SA1111_GPIO_PXDWR = (SA1111_GPIO_PADWR - SA1111_GPIO_PADDR), > - SA1111_GPIO_PXSDR = (SA1111_GPIO_PASDR - SA1111_GPIO_PADDR), > - SA1111_GPIO_PXSSR = (SA1111_GPIO_PASSR - SA1111_GPIO_PADDR), > -}; > - > -static struct sa1111 *gc_to_sa1111(struct gpio_chip *gc) > -{ > - return container_of(gc, struct sa1111, gc); > -} > - > -static void __iomem *sa1111_gpio_map_reg(struct sa1111 *sachip, unsigned offset) > -{ > - void __iomem *reg = sachip->base + SA1111_GPIO; > - > - if (offset < 4) > - return reg + SA1111_GPIO_PADDR; > - if (offset < 10) > - return reg + SA1111_GPIO_PBDDR; > - if (offset < 18) > - return reg + SA1111_GPIO_PCDDR; > - return NULL; > -} > - > -static u32 sa1111_gpio_map_bit(unsigned offset) > -{ > - if (offset < 4) > - return BIT(offset); > - if (offset < 10) > - return BIT(offset - 4); > - if (offset < 18) > - return BIT(offset - 10); > - return 0; > -} > - > -static void sa1111_gpio_modify(void __iomem *reg, u32 mask, u32 set) > -{ > - u32 val; > - > - val = readl_relaxed(reg); > - val &= ~mask; > - val |= mask & set; > - writel_relaxed(val, reg); > -} > - > -static int sa1111_gpio_get_direction(struct gpio_chip *gc, unsigned offset) > -{ > - struct sa1111 *sachip = gc_to_sa1111(gc); > - void __iomem *reg = sa1111_gpio_map_reg(sachip, offset); > - u32 mask = sa1111_gpio_map_bit(offset); > - > - return !!(readl_relaxed(reg + SA1111_GPIO_PXDDR) & mask); > -} > - > -static int sa1111_gpio_direction_input(struct gpio_chip *gc, unsigned offset) > -{ > - struct sa1111 *sachip = gc_to_sa1111(gc); > - unsigned long flags; > - void __iomem *reg = sa1111_gpio_map_reg(sachip, offset); > - u32 mask = sa1111_gpio_map_bit(offset); > - > - spin_lock_irqsave(&sachip->lock, flags); > - sa1111_gpio_modify(reg + SA1111_GPIO_PXDDR, mask, mask); > - sa1111_gpio_modify(reg + SA1111_GPIO_PXSDR, mask, mask); > - spin_unlock_irqrestore(&sachip->lock, flags); > - > - return 0; > -} > - > -static int sa1111_gpio_direction_output(struct gpio_chip *gc, unsigned offset, > - int value) > -{ > - struct sa1111 *sachip = gc_to_sa1111(gc); > - unsigned long flags; > - void __iomem *reg = sa1111_gpio_map_reg(sachip, offset); > - u32 mask = sa1111_gpio_map_bit(offset); > - > - spin_lock_irqsave(&sachip->lock, flags); > - sa1111_gpio_modify(reg + SA1111_GPIO_PXDWR, mask, value ? mask : 0); > - sa1111_gpio_modify(reg + SA1111_GPIO_PXSSR, mask, value ? mask : 0); > - sa1111_gpio_modify(reg + SA1111_GPIO_PXDDR, mask, 0); > - sa1111_gpio_modify(reg + SA1111_GPIO_PXSDR, mask, 0); > - spin_unlock_irqrestore(&sachip->lock, flags); > - > - return 0; > -} > - > -static int sa1111_gpio_get(struct gpio_chip *gc, unsigned offset) > -{ > - struct sa1111 *sachip = gc_to_sa1111(gc); > - void __iomem *reg = sa1111_gpio_map_reg(sachip, offset); > - u32 mask = sa1111_gpio_map_bit(offset); > - > - return !!(readl_relaxed(reg + SA1111_GPIO_PXDRR) & mask); > -} > - > -static int sa1111_gpio_set(struct gpio_chip *gc, unsigned int offset, int value) > -{ > - struct sa1111 *sachip = gc_to_sa1111(gc); > - unsigned long flags; > - void __iomem *reg = sa1111_gpio_map_reg(sachip, offset); > - u32 mask = sa1111_gpio_map_bit(offset); > - > - spin_lock_irqsave(&sachip->lock, flags); > - sa1111_gpio_modify(reg + SA1111_GPIO_PXDWR, mask, value ? mask : 0); > - sa1111_gpio_modify(reg + SA1111_GPIO_PXSSR, mask, value ? mask : 0); > - spin_unlock_irqrestore(&sachip->lock, flags); > - > - return 0; > -} > - > -static int sa1111_gpio_set_multiple(struct gpio_chip *gc, unsigned long *mask, > - unsigned long *bits) > -{ > - struct sa1111 *sachip = gc_to_sa1111(gc); > - unsigned long flags; > - void __iomem *reg = sachip->base + SA1111_GPIO; > - u32 msk, val; > - > - msk = *mask; > - val = *bits; > - > - spin_lock_irqsave(&sachip->lock, flags); > - sa1111_gpio_modify(reg + SA1111_GPIO_PADWR, msk & 15, val); > - sa1111_gpio_modify(reg + SA1111_GPIO_PASSR, msk & 15, val); > - sa1111_gpio_modify(reg + SA1111_GPIO_PBDWR, (msk >> 4) & 255, val >> 4); > - sa1111_gpio_modify(reg + SA1111_GPIO_PBSSR, (msk >> 4) & 255, val >> 4); > - sa1111_gpio_modify(reg + SA1111_GPIO_PCDWR, (msk >> 12) & 255, val >> 12); > - sa1111_gpio_modify(reg + SA1111_GPIO_PCSSR, (msk >> 12) & 255, val >> 12); > - spin_unlock_irqrestore(&sachip->lock, flags); > - > - return 0; > -} > - > -static int sa1111_gpio_to_irq(struct gpio_chip *gc, unsigned offset) > -{ > - struct sa1111 *sachip = gc_to_sa1111(gc); > - > - return sa1111_map_irq(sachip, offset); > -} > - > -static int sa1111_setup_gpios(struct sa1111 *sachip) > -{ > - sachip->gc.label = "sa1111"; > - sachip->gc.parent = sachip->dev; > - sachip->gc.owner = THIS_MODULE; > - sachip->gc.get_direction = sa1111_gpio_get_direction; > - sachip->gc.direction_input = sa1111_gpio_direction_input; > - sachip->gc.direction_output = sa1111_gpio_direction_output; > - sachip->gc.get = sa1111_gpio_get; > - sachip->gc.set = sa1111_gpio_set; > - sachip->gc.set_multiple = sa1111_gpio_set_multiple; > - sachip->gc.to_irq = sa1111_gpio_to_irq; > - sachip->gc.base = -1; > - sachip->gc.ngpio = 18; > - > - return devm_gpiochip_add_data(sachip->dev, &sachip->gc, sachip); > -} > - > -/* > - * Bring the SA1111 out of reset. This requires a set procedure: > - * 1. nRESET asserted (by hardware) > - * 2. CLK turned on from SA1110 > - * 3. nRESET deasserted > - * 4. VCO turned on, PLL_BYPASS turned off > - * 5. Wait lock time, then assert RCLKEn > - * 7. PCR set to allow clocking of individual functions > - * > - * Until we've done this, the only registers we can access are: > - * SBI_SKCR > - * SBI_SMCR > - * SBI_SKID > - */ > -static void sa1111_wake(struct sa1111 *sachip) > -{ > - unsigned long flags, r; > - > - spin_lock_irqsave(&sachip->lock, flags); > - > - clk_enable(sachip->clk); > - > - /* > - * Turn VCO on, and disable PLL Bypass. > - */ > - r = readl_relaxed(sachip->base + SA1111_SKCR); > - r &= ~SKCR_VCO_OFF; > - writel_relaxed(r, sachip->base + SA1111_SKCR); > - r |= SKCR_PLL_BYPASS | SKCR_OE_EN; > - writel_relaxed(r, sachip->base + SA1111_SKCR); > - > - /* > - * Wait lock time. SA1111 manual _doesn't_ > - * specify a figure for this! We choose 100us. > - */ > - udelay(100); > - > - /* > - * Enable RCLK. We also ensure that RDYEN is set. > - */ > - r |= SKCR_RCLKEN | SKCR_RDYEN; > - writel_relaxed(r, sachip->base + SA1111_SKCR); > - > - /* > - * Wait 14 RCLK cycles for the chip to finish coming out > - * of reset. (RCLK=24MHz). This is 590ns. > - */ > - udelay(1); > - > - /* > - * Ensure all clocks are initially off. > - */ > - writel_relaxed(0, sachip->base + SA1111_SKPCR); > - > - spin_unlock_irqrestore(&sachip->lock, flags); > -} > - > -#ifdef CONFIG_ARCH_SA1100 > - > -static u32 sa1111_dma_mask[] = { > - ~0, > - ~(1 << 20), > - ~(1 << 23), > - ~(1 << 24), > - ~(1 << 25), > - ~(1 << 20), > - ~(1 << 20), > - 0, > -}; > - > -/* > - * Configure the SA1111 shared memory controller. > - */ > -static void > -sa1111_configure_smc(struct sa1111 *sachip, int sdram, unsigned int drac, > - unsigned int cas_latency) > -{ > - unsigned int smcr = SMCR_DTIM | SMCR_MBGE | FInsrt(drac, SMCR_DRAC); > - > - if (cas_latency == 3) > - smcr |= SMCR_CLAT; > - > - writel_relaxed(smcr, sachip->base + SA1111_SMCR); > - > - /* > - * Now clear the bits in the DMA mask to work around the SA1111 > - * DMA erratum (Intel StrongARM SA-1111 Microprocessor Companion > - * Chip Specification Update, June 2000, Erratum #7). > - */ > - if (sachip->dev->dma_mask) > - *sachip->dev->dma_mask &= sa1111_dma_mask[drac >> 2]; > - > - sachip->dev->coherent_dma_mask &= sa1111_dma_mask[drac >> 2]; > -} > -#endif > - > -static void sa1111_dev_release(struct device *_dev) > -{ > - struct sa1111_dev *dev = to_sa1111_device(_dev); > - > - kfree(dev); > -} > - > -static int > -sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent, > - struct sa1111_dev_info *info) > -{ > - struct sa1111_dev *dev; > - unsigned i; > - int ret; > - > - dev = kzalloc_obj(struct sa1111_dev); > - if (!dev) { > - ret = -ENOMEM; > - goto err_alloc; > - } > - > - device_initialize(&dev->dev); > - dev_set_name(&dev->dev, "%4.4lx", info->offset); > - dev->devid = info->devid; > - dev->dev.parent = sachip->dev; > - dev->dev.bus = &sa1111_bus_type; > - dev->dev.release = sa1111_dev_release; > - dev->res.start = sachip->phys + info->offset; > - dev->res.end = dev->res.start + 511; > - dev->res.name = dev_name(&dev->dev); > - dev->res.flags = IORESOURCE_MEM; > - dev->mapbase = sachip->base + info->offset; > - dev->skpcr_mask = info->skpcr_mask; > - > - for (i = 0; i < ARRAY_SIZE(info->hwirq); i++) > - dev->hwirq[i] = info->hwirq[i]; > - > - /* > - * If the parent device has a DMA mask associated with it, and > - * this child supports DMA, propagate it down to the children. > - */ > - if (info->dma && sachip->dev->dma_mask) { > - dev->dma_mask = *sachip->dev->dma_mask; > - dev->dev.dma_mask = &dev->dma_mask; > - dev->dev.coherent_dma_mask = sachip->dev->coherent_dma_mask; > - } > - > - ret = request_resource(parent, &dev->res); > - if (ret) { > - dev_err(sachip->dev, "failed to allocate resource for %s\n", > - dev->res.name); > - goto err_resource; > - } > - > - ret = device_add(&dev->dev); > - if (ret) > - goto err_add; > - return 0; > - > - err_add: > - release_resource(&dev->res); > - err_resource: > - put_device(&dev->dev); > - err_alloc: > - return ret; > -} > - > -static int __sa1111_probe(struct device *me, struct resource *mem, int irq) > -{ > - struct sa1111_platform_data *pd = me->platform_data; > - struct sa1111 *sachip; > - unsigned long id; > - unsigned int has_devs; > - int i, ret = -ENODEV; > - > - if (!pd) > - return -EINVAL; > - > - sachip = devm_kzalloc(me, sizeof(struct sa1111), GFP_KERNEL); > - if (!sachip) > - return -ENOMEM; > - > - sachip->clk = devm_clk_get(me, "SA1111_CLK"); > - if (IS_ERR(sachip->clk)) > - return PTR_ERR(sachip->clk); > - > - ret = clk_prepare(sachip->clk); > - if (ret) > - return ret; > - > - spin_lock_init(&sachip->lock); > - > - sachip->dev = me; > - dev_set_drvdata(sachip->dev, sachip); > - > - sachip->pdata = pd; > - sachip->phys = mem->start; > - sachip->irq = irq; > - > - /* > - * Map the whole region. This also maps the > - * registers for our children. > - */ > - sachip->base = ioremap(mem->start, PAGE_SIZE * 2); > - if (!sachip->base) { > - ret = -ENOMEM; > - goto err_clk_unprep; > - } > - > - /* > - * Probe for the chip. Only touch the SBI registers. > - */ > - id = readl_relaxed(sachip->base + SA1111_SKID); > - if ((id & SKID_ID_MASK) != SKID_SA1111_ID) { > - printk(KERN_DEBUG "SA1111 not detected: ID = %08lx\n", id); > - ret = -ENODEV; > - goto err_unmap; > - } > - > - pr_info("SA1111 Microprocessor Companion Chip: silicon revision %lx, metal revision %lx\n", > - (id & SKID_SIREV_MASK) >> 4, id & SKID_MTREV_MASK); > - > - /* > - * We found it. Wake the chip up, and initialise. > - */ > - sa1111_wake(sachip); > - > - /* > - * The interrupt controller must be initialised before any > - * other device to ensure that the interrupts are available. > - */ > - ret = sa1111_setup_irq(sachip, pd->irq_base); > - if (ret) > - goto err_clk; > - > - /* Setup the GPIOs - should really be done after the IRQ setup */ > - ret = sa1111_setup_gpios(sachip); > - if (ret) > - goto err_irq; > - > -#ifdef CONFIG_ARCH_SA1100 > - { > - unsigned int val; > - > - /* > - * The SDRAM configuration of the SA1110 and the SA1111 must > - * match. This is very important to ensure that SA1111 accesses > - * don't corrupt the SDRAM. Note that this ungates the SA1111's > - * MBGNT signal, so we must have called sa1110_mb_disable() > - * beforehand. > - */ > - sa1111_configure_smc(sachip, 1, > - FExtr(MDCNFG, MDCNFG_SA1110_DRAC0), > - FExtr(MDCNFG, MDCNFG_SA1110_TDL0)); > - > - /* > - * We only need to turn on DCLK whenever we want to use the > - * DMA. It can otherwise be held firmly in the off position. > - * (currently, we always enable it.) > - */ > - val = readl_relaxed(sachip->base + SA1111_SKPCR); > - writel_relaxed(val | SKPCR_DCLKEN, sachip->base + SA1111_SKPCR); > - > - /* > - * Enable the SA1110 memory bus request and grant signals. > - */ > - sa1110_mb_enable(); > - } > -#endif > - > - g_sa1111 = sachip; > - > - has_devs = ~0; > - if (pd) > - has_devs &= ~pd->disable_devs; > - > - for (i = 0; i < ARRAY_SIZE(sa1111_devices); i++) > - if (sa1111_devices[i].devid & has_devs) > - sa1111_init_one_child(sachip, mem, &sa1111_devices[i]); > - > - return 0; > - > - err_irq: > - sa1111_remove_irq(sachip); > - err_clk: > - clk_disable(sachip->clk); > - err_unmap: > - iounmap(sachip->base); > - err_clk_unprep: > - clk_unprepare(sachip->clk); > - return ret; > -} > - > -static int sa1111_remove_one(struct device *dev, void *data) > -{ > - struct sa1111_dev *sadev = to_sa1111_device(dev); > - if (dev->bus != &sa1111_bus_type) > - return 0; > - device_del(&sadev->dev); > - release_resource(&sadev->res); > - put_device(&sadev->dev); > - return 0; > -} > - > -static void __sa1111_remove(struct sa1111 *sachip) > -{ > - device_for_each_child(sachip->dev, NULL, sa1111_remove_one); > - > - sa1111_remove_irq(sachip); > - > - clk_disable(sachip->clk); > - clk_unprepare(sachip->clk); > - > - iounmap(sachip->base); > -} > - > -struct sa1111_save_data { > - unsigned int skcr; > - unsigned int skpcr; > - unsigned int skcdr; > - unsigned char skaud; > - unsigned char skpwm0; > - unsigned char skpwm1; > - > - /* > - * Interrupt controller > - */ > - unsigned int intpol0; > - unsigned int intpol1; > - unsigned int inten0; > - unsigned int inten1; > - unsigned int wakepol0; > - unsigned int wakepol1; > - unsigned int wakeen0; > - unsigned int wakeen1; > -}; > - > -#ifdef CONFIG_PM > - > -static int sa1111_suspend_noirq(struct device *dev) > -{ > - struct sa1111 *sachip = dev_get_drvdata(dev); > - struct sa1111_save_data *save; > - unsigned long flags; > - unsigned int val; > - void __iomem *base; > - > - save = kmalloc_obj(struct sa1111_save_data); > - if (!save) > - return -ENOMEM; > - sachip->saved_state = save; > - > - spin_lock_irqsave(&sachip->lock, flags); > - > - /* > - * Save state. > - */ > - base = sachip->base; > - save->skcr = readl_relaxed(base + SA1111_SKCR); > - save->skpcr = readl_relaxed(base + SA1111_SKPCR); > - save->skcdr = readl_relaxed(base + SA1111_SKCDR); > - save->skaud = readl_relaxed(base + SA1111_SKAUD); > - save->skpwm0 = readl_relaxed(base + SA1111_SKPWM0); > - save->skpwm1 = readl_relaxed(base + SA1111_SKPWM1); > - > - writel_relaxed(0, sachip->base + SA1111_SKPWM0); > - writel_relaxed(0, sachip->base + SA1111_SKPWM1); > - > - base = sachip->base + SA1111_INTC; > - save->intpol0 = readl_relaxed(base + SA1111_INTPOL0); > - save->intpol1 = readl_relaxed(base + SA1111_INTPOL1); > - save->inten0 = readl_relaxed(base + SA1111_INTEN0); > - save->inten1 = readl_relaxed(base + SA1111_INTEN1); > - save->wakepol0 = readl_relaxed(base + SA1111_WAKEPOL0); > - save->wakepol1 = readl_relaxed(base + SA1111_WAKEPOL1); > - save->wakeen0 = readl_relaxed(base + SA1111_WAKEEN0); > - save->wakeen1 = readl_relaxed(base + SA1111_WAKEEN1); > - > - /* > - * Disable. > - */ > - val = readl_relaxed(sachip->base + SA1111_SKCR); > - writel_relaxed(val | SKCR_SLEEP, sachip->base + SA1111_SKCR); > - > - clk_disable(sachip->clk); > - > - spin_unlock_irqrestore(&sachip->lock, flags); > - > -#ifdef CONFIG_ARCH_SA1100 > - sa1110_mb_disable(); > -#endif > - > - return 0; > -} > - > -/* > - * sa1111_resume - Restore the SA1111 device state. > - * @dev: device to restore > - * > - * Restore the general state of the SA1111; clock control and > - * interrupt controller. Other parts of the SA1111 must be > - * restored by their respective drivers, and must be called > - * via LDM after this function. > - */ > -static int sa1111_resume_noirq(struct device *dev) > -{ > - struct sa1111 *sachip = dev_get_drvdata(dev); > - struct sa1111_save_data *save; > - unsigned long flags, id; > - void __iomem *base; > - > - save = sachip->saved_state; > - if (!save) > - return 0; > - > - /* > - * Ensure that the SA1111 is still here. > - * FIXME: shouldn't do this here. > - */ > - id = readl_relaxed(sachip->base + SA1111_SKID); > - if ((id & SKID_ID_MASK) != SKID_SA1111_ID) { > - __sa1111_remove(sachip); > - dev_set_drvdata(dev, NULL); > - kfree(save); > - return 0; > - } > - > - /* > - * First of all, wake up the chip. > - */ > - sa1111_wake(sachip); > - > -#ifdef CONFIG_ARCH_SA1100 > - /* Enable the memory bus request/grant signals */ > - sa1110_mb_enable(); > -#endif > - > - /* > - * Only lock for write ops. Also, sa1111_wake must be called with > - * released spinlock! > - */ > - spin_lock_irqsave(&sachip->lock, flags); > - > - writel_relaxed(0, sachip->base + SA1111_INTC + SA1111_INTEN0); > - writel_relaxed(0, sachip->base + SA1111_INTC + SA1111_INTEN1); > - > - base = sachip->base; > - writel_relaxed(save->skcr, base + SA1111_SKCR); > - writel_relaxed(save->skpcr, base + SA1111_SKPCR); > - writel_relaxed(save->skcdr, base + SA1111_SKCDR); > - writel_relaxed(save->skaud, base + SA1111_SKAUD); > - writel_relaxed(save->skpwm0, base + SA1111_SKPWM0); > - writel_relaxed(save->skpwm1, base + SA1111_SKPWM1); > - > - base = sachip->base + SA1111_INTC; > - writel_relaxed(save->intpol0, base + SA1111_INTPOL0); > - writel_relaxed(save->intpol1, base + SA1111_INTPOL1); > - writel_relaxed(save->inten0, base + SA1111_INTEN0); > - writel_relaxed(save->inten1, base + SA1111_INTEN1); > - writel_relaxed(save->wakepol0, base + SA1111_WAKEPOL0); > - writel_relaxed(save->wakepol1, base + SA1111_WAKEPOL1); > - writel_relaxed(save->wakeen0, base + SA1111_WAKEEN0); > - writel_relaxed(save->wakeen1, base + SA1111_WAKEEN1); > - > - spin_unlock_irqrestore(&sachip->lock, flags); > - > - sachip->saved_state = NULL; > - kfree(save); > - > - return 0; > -} > - > -#else > -#define sa1111_suspend_noirq NULL > -#define sa1111_resume_noirq NULL > -#endif > - > -/** > - * sa1111_probe - probe for a single SA1111 chip. > - * @pdev: platform device. > - * > - * Probe for a SA1111 chip. This must be called > - * before any other SA1111-specific code. > - * > - * Returns: > - * * %-ENODEV - device not found. > - * * %-ENOMEM - memory allocation failure. > - * * %-EBUSY - physical address already marked in-use. > - * * %-EINVAL - no platform data passed > - * * %0 - successful. > - */ > -static int sa1111_probe(struct platform_device *pdev) > -{ > - struct resource *mem; > - int irq; > - > - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - if (!mem) > - return -EINVAL; > - irq = platform_get_irq(pdev, 0); > - if (irq < 0) > - return irq; > - > - return __sa1111_probe(&pdev->dev, mem, irq); > -} > - > -static void sa1111_remove(struct platform_device *pdev) > -{ > - struct sa1111 *sachip = platform_get_drvdata(pdev); > - > - if (sachip) { > -#ifdef CONFIG_PM > - kfree(sachip->saved_state); > - sachip->saved_state = NULL; > -#endif > - __sa1111_remove(sachip); > - platform_set_drvdata(pdev, NULL); > - } > -} > - > -static struct dev_pm_ops sa1111_pm_ops = { > - .suspend_noirq = sa1111_suspend_noirq, > - .resume_noirq = sa1111_resume_noirq, > -}; > - > -/* > - * Not sure if this should be on the system bus or not yet. > - * We really want some way to register a system device at > - * the per-machine level, and then have this driver pick > - * up the registered devices. > - * > - * We also need to handle the SDRAM configuration for > - * PXA250/SA1110 machine classes. > - */ > -static struct platform_driver sa1111_device_driver = { > - .probe = sa1111_probe, > - .remove = sa1111_remove, > - .driver = { > - .name = "sa1111", > - .pm = &sa1111_pm_ops, > - }, > -}; > - > -/* > - * Get the parent device driver (us) structure > - * from a child function device > - */ > -static inline struct sa1111 *sa1111_chip_driver(struct sa1111_dev *sadev) > -{ > - return (struct sa1111 *)dev_get_drvdata(sadev->dev.parent); > -} > - > -/* > - * The bits in the opdiv field are non-linear. > - */ > -static unsigned char opdiv_table[] = { 1, 4, 2, 8 }; > - > -static unsigned int __sa1111_pll_clock(struct sa1111 *sachip) > -{ > - unsigned int skcdr, fbdiv, ipdiv, opdiv; > - > - skcdr = readl_relaxed(sachip->base + SA1111_SKCDR); > - > - fbdiv = (skcdr & 0x007f) + 2; > - ipdiv = ((skcdr & 0x0f80) >> 7) + 2; > - opdiv = opdiv_table[(skcdr & 0x3000) >> 12]; > - > - return 3686400 * fbdiv / (ipdiv * opdiv); > -} > - > -/** > - * sa1111_pll_clock - return the current PLL clock frequency. > - * @sadev: SA1111 function block > - * > - * BUG: we should look at SKCR. We also blindly believe that > - * the chip is being fed with the 3.6864MHz clock. > - * > - * Returns the PLL clock in Hz. > - */ > -unsigned int sa1111_pll_clock(struct sa1111_dev *sadev) > -{ > - struct sa1111 *sachip = sa1111_chip_driver(sadev); > - > - return __sa1111_pll_clock(sachip); > -} > -EXPORT_SYMBOL(sa1111_pll_clock); > - > -/** > - * sa1111_select_audio_mode - select I2S or AC link mode > - * @sadev: SA1111 function block > - * @mode: One of %SA1111_AUDIO_ACLINK or %SA1111_AUDIO_I2S > - * > - * Frob the SKCR to select AC Link mode or I2S mode for > - * the audio block. > - */ > -void sa1111_select_audio_mode(struct sa1111_dev *sadev, int mode) > -{ > - struct sa1111 *sachip = sa1111_chip_driver(sadev); > - unsigned long flags; > - unsigned int val; > - > - spin_lock_irqsave(&sachip->lock, flags); > - > - val = readl_relaxed(sachip->base + SA1111_SKCR); > - if (mode == SA1111_AUDIO_I2S) { > - val &= ~SKCR_SELAC; > - } else { > - val |= SKCR_SELAC; > - } > - writel_relaxed(val, sachip->base + SA1111_SKCR); > - > - spin_unlock_irqrestore(&sachip->lock, flags); > -} > -EXPORT_SYMBOL(sa1111_select_audio_mode); > - > -/** > - * sa1111_set_audio_rate - set the audio sample rate > - * @sadev: SA1111 SAC function block > - * @rate: sample rate to select > - */ > -int sa1111_set_audio_rate(struct sa1111_dev *sadev, int rate) > -{ > - struct sa1111 *sachip = sa1111_chip_driver(sadev); > - unsigned int div; > - > - if (sadev->devid != SA1111_DEVID_SAC) > - return -EINVAL; > - > - div = (__sa1111_pll_clock(sachip) / 256 + rate / 2) / rate; > - if (div == 0) > - div = 1; > - if (div > 128) > - div = 128; > - > - writel_relaxed(div - 1, sachip->base + SA1111_SKAUD); > - > - return 0; > -} > -EXPORT_SYMBOL(sa1111_set_audio_rate); > - > -/** > - * sa1111_get_audio_rate - get the audio sample rate > - * @sadev: SA1111 SAC function block device > - */ > -int sa1111_get_audio_rate(struct sa1111_dev *sadev) > -{ > - struct sa1111 *sachip = sa1111_chip_driver(sadev); > - unsigned long div; > - > - if (sadev->devid != SA1111_DEVID_SAC) > - return -EINVAL; > - > - div = readl_relaxed(sachip->base + SA1111_SKAUD) + 1; > - > - return __sa1111_pll_clock(sachip) / (256 * div); > -} > -EXPORT_SYMBOL(sa1111_get_audio_rate); > - > -/* > - * Individual device operations. > - */ > - > -/** > - * sa1111_enable_device - enable an on-chip SA1111 function block > - * @sadev: SA1111 function block device to enable > - */ > -int sa1111_enable_device(struct sa1111_dev *sadev) > -{ > - struct sa1111 *sachip = sa1111_chip_driver(sadev); > - unsigned long flags; > - unsigned int val; > - int ret = 0; > - > - if (sachip->pdata && sachip->pdata->enable) > - ret = sachip->pdata->enable(sachip->pdata->data, sadev->devid); > - > - if (ret == 0) { > - spin_lock_irqsave(&sachip->lock, flags); > - val = readl_relaxed(sachip->base + SA1111_SKPCR); > - writel_relaxed(val | sadev->skpcr_mask, sachip->base + SA1111_SKPCR); > - spin_unlock_irqrestore(&sachip->lock, flags); > - } > - return ret; > -} > -EXPORT_SYMBOL(sa1111_enable_device); > - > -/** > - * sa1111_disable_device - disable an on-chip SA1111 function block > - * @sadev: SA1111 function block device to disable > - */ > -void sa1111_disable_device(struct sa1111_dev *sadev) > -{ > - struct sa1111 *sachip = sa1111_chip_driver(sadev); > - unsigned long flags; > - unsigned int val; > - > - spin_lock_irqsave(&sachip->lock, flags); > - val = readl_relaxed(sachip->base + SA1111_SKPCR); > - writel_relaxed(val & ~sadev->skpcr_mask, sachip->base + SA1111_SKPCR); > - spin_unlock_irqrestore(&sachip->lock, flags); > - > - if (sachip->pdata && sachip->pdata->disable) > - sachip->pdata->disable(sachip->pdata->data, sadev->devid); > -} > -EXPORT_SYMBOL(sa1111_disable_device); > - > -int sa1111_get_irq(struct sa1111_dev *sadev, unsigned num) > -{ > - struct sa1111 *sachip = sa1111_chip_driver(sadev); > - if (num >= ARRAY_SIZE(sadev->hwirq)) > - return -EINVAL; > - return sa1111_map_irq(sachip, sadev->hwirq[num]); > -} > -EXPORT_SYMBOL_GPL(sa1111_get_irq); > - > -/* > - * SA1111 "Register Access Bus." > - * > - * We model this as a regular bus type, and hang devices directly > - * off this. > - */ > -static int sa1111_match(struct device *_dev, const struct device_driver *_drv) > -{ > - struct sa1111_dev *dev = to_sa1111_device(_dev); > - const struct sa1111_driver *drv = SA1111_DRV(_drv); > - > - return !!(dev->devid & drv->devid); > -} > - > -static int sa1111_bus_probe(struct device *dev) > -{ > - struct sa1111_dev *sadev = to_sa1111_device(dev); > - struct sa1111_driver *drv = SA1111_DRV(dev->driver); > - int ret = -ENODEV; > - > - if (drv->probe) > - ret = drv->probe(sadev); > - return ret; > -} > - > -static void sa1111_bus_remove(struct device *dev) > -{ > - struct sa1111_dev *sadev = to_sa1111_device(dev); > - struct sa1111_driver *drv = SA1111_DRV(dev->driver); > - > - if (drv->remove) > - drv->remove(sadev); > -} > - > -const struct bus_type sa1111_bus_type = { > - .name = "sa1111-rab", > - .match = sa1111_match, > - .probe = sa1111_bus_probe, > - .remove = sa1111_bus_remove, > -}; > -EXPORT_SYMBOL(sa1111_bus_type); > - > -int sa1111_driver_register(struct sa1111_driver *driver) > -{ > - driver->drv.bus = &sa1111_bus_type; > - return driver_register(&driver->drv); > -} > -EXPORT_SYMBOL(sa1111_driver_register); > - > -void sa1111_driver_unregister(struct sa1111_driver *driver) > -{ > - driver_unregister(&driver->drv); > -} > -EXPORT_SYMBOL(sa1111_driver_unregister); > - > -static int __init sa1111_init(void) > -{ > - int ret = bus_register(&sa1111_bus_type); > - if (ret == 0) > - platform_driver_register(&sa1111_device_driver); > - return ret; > -} > - > -static void __exit sa1111_exit(void) > -{ > - platform_driver_unregister(&sa1111_device_driver); > - bus_unregister(&sa1111_bus_type); > -} > - > -subsys_initcall(sa1111_init); > -module_exit(sa1111_exit); > - > -MODULE_DESCRIPTION("Intel Corporation SA1111 core driver"); > -MODULE_LICENSE("GPL"); > diff --git a/arch/arm/configs/assabet_defconfig b/arch/arm/configs/assabet_defconfig > deleted file mode 100644 > index e4264fdac2e5..000000000000 > --- a/arch/arm/configs/assabet_defconfig > +++ /dev/null > @@ -1,57 +0,0 @@ > -CONFIG_SYSVIPC=y > -CONFIG_LOG_BUF_SHIFT=14 > -CONFIG_BLK_DEV_INITRD=y > -CONFIG_EXPERT=y > -CONFIG_ARCH_MULTI_V4=y > -# CONFIG_ARCH_MULTI_V7 is not set > -CONFIG_ARCH_SA1100=y > -CONFIG_SA1100_ASSABET=y > -# CONFIG_AEABI is not set > -CONFIG_ATAGS=y > -CONFIG_CMDLINE="mem=32M console=ttySA0,38400n8 initrd=0xc0800000,3M root=/dev/ram" > -CONFIG_FPE_NWFPE=y > -CONFIG_PM=y > -CONFIG_MODULES=y > -CONFIG_PARTITION_ADVANCED=y > -CONFIG_NET=y > -CONFIG_UNIX=y > -CONFIG_INET=y > -# CONFIG_IPV6 is not set > -CONFIG_PCCARD=y > -CONFIG_PCMCIA_SA1100=y > -CONFIG_MTD=y > -CONFIG_MTD_REDBOOT_PARTS=y > -CONFIG_MTD_BLOCK=y > -CONFIG_MTD_CFI=y > -CONFIG_MTD_CFI_ADV_OPTIONS=y > -CONFIG_MTD_CFI_GEOMETRY=y > -# CONFIG_MTD_CFI_I1 is not set > -CONFIG_MTD_CFI_INTELEXT=y > -CONFIG_MTD_SA1100=y > -CONFIG_BLK_DEV_LOOP=m > -CONFIG_BLK_DEV_RAM=y > -CONFIG_NETDEVICES=y > -CONFIG_NET_PCMCIA=y > -CONFIG_PCMCIA_PCNET=y > -CONFIG_INPUT_EVDEV=y > -# CONFIG_INPUT_KEYBOARD is not set > -# CONFIG_INPUT_MOUSE is not set > -# CONFIG_SERIO is not set > -CONFIG_SERIAL_8250=m > -CONFIG_SERIAL_SA1100=y > -CONFIG_SERIAL_SA1100_CONSOLE=y > -CONFIG_FB=y > -CONFIG_FB_SA1100=y > -# CONFIG_VGA_CONSOLE is not set > -CONFIG_SOUND=y > -CONFIG_NEW_LEDS=y > -CONFIG_LEDS_CLASS=y > -CONFIG_LEDS_TRIGGERS=y > -CONFIG_LEDS_TRIGGER_CPU=y > -CONFIG_EXT2_FS=y > -CONFIG_MSDOS_FS=y > -CONFIG_TMPFS=y > -CONFIG_JFFS2_FS=y > -CONFIG_NFS_FS=y > -CONFIG_NLS_CODEPAGE_437=y > -CONFIG_DEBUG_USER=y > diff --git a/arch/arm/configs/collie_defconfig b/arch/arm/configs/collie_defconfig > deleted file mode 100644 > index 570a5f8bc57b..000000000000 > --- a/arch/arm/configs/collie_defconfig > +++ /dev/null > @@ -1,87 +0,0 @@ > -CONFIG_SYSVIPC=y > -CONFIG_LOG_BUF_SHIFT=14 > -CONFIG_BLK_DEV_INITRD=y > -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set > -CONFIG_EXPERT=y > -CONFIG_BASE_SMALL=y > -# CONFIG_EPOLL is not set > -CONFIG_ARCH_MULTI_V4=y > -# CONFIG_ARCH_MULTI_V7 is not set > -CONFIG_ARCH_SA1100=y > -CONFIG_SA1100_COLLIE=y > -CONFIG_ATAGS=y > -CONFIG_CMDLINE="noinitrd root=/dev/mtdblock2 rootfstype=jffs2 fbcon=rotate:1" > -CONFIG_PM=y > -# CONFIG_SWAP is not set > -CONFIG_SLUB_TINY=y > -CONFIG_NET=y > -CONFIG_PACKET=y > -CONFIG_UNIX=y > -CONFIG_INET=y > -# CONFIG_IPV6 is not set > -CONFIG_PCCARD=y > -CONFIG_PCMCIA_SA1100=y > -CONFIG_PCMCIA_DEBUG=y > -CONFIG_MTD=y > -CONFIG_MTD_BLOCK=y > -CONFIG_MTD_CFI=y > -CONFIG_MTD_JEDECPROBE=y > -CONFIG_MTD_CFI_ADV_OPTIONS=y > -CONFIG_MTD_CFI_GEOMETRY=y > -# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set > -# CONFIG_MTD_MAP_BANK_WIDTH_2 is not set > -# CONFIG_MTD_CFI_I1 is not set > -# CONFIG_MTD_CFI_I2 is not set > -CONFIG_MTD_CFI_I4=y > -CONFIG_MTD_CFI_INTELEXT=y > -CONFIG_MTD_SA1100=y > -CONFIG_BLK_DEV_LOOP=y > -CONFIG_BLK_DEV_RAM=y > -CONFIG_BLK_DEV_RAM_SIZE=1024 > -CONFIG_BLK_DEV_SD=y > -CONFIG_ATA=y > -CONFIG_PATA_PCMCIA=y > -# CONFIG_INPUT_MOUSEDEV is not set > -CONFIG_INPUT_EVDEV=y > -# CONFIG_KEYBOARD_ATKBD is not set > -CONFIG_KEYBOARD_LOCOMO=y > -# CONFIG_INPUT_MOUSE is not set > -CONFIG_INPUT_TOUCHSCREEN=y > -# CONFIG_SERIO_SERPORT is not set > -# CONFIG_LEGACY_PTYS is not set > -CONFIG_SERIAL_8250=y > -CONFIG_SERIAL_8250_CS=y > -CONFIG_SERIAL_8250_EXTENDED=y > -CONFIG_SERIAL_SA1100=y > -CONFIG_SERIAL_SA1100_CONSOLE=y > -# CONFIG_HWMON is not set > -CONFIG_MCP_SA11X0=y > -CONFIG_MCP_UCB1200=y > -CONFIG_MCP_UCB1200_TS=y > -CONFIG_FB=y > -CONFIG_FB_SA1100=y > -# CONFIG_VGA_CONSOLE is not set > -CONFIG_FB_MODE_HELPERS=y > -CONFIG_FRAMEBUFFER_CONSOLE=y > -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y > -CONFIG_NEW_LEDS=y > -CONFIG_LEDS_CLASS=y > -CONFIG_LEDS_LOCOMO=y > -CONFIG_LEDS_TRIGGERS=y > -CONFIG_LEDS_TRIGGER_TIMER=y > -CONFIG_LEDS_TRIGGER_DISK=y > -# CONFIG_DNOTIFY is not set > -CONFIG_VFAT_FS=y > -CONFIG_TMPFS=y > -CONFIG_JFFS2_FS=y > -CONFIG_ROMFS_FS=y > -CONFIG_NLS_DEFAULT="cp437" > -CONFIG_NLS_CODEPAGE_437=y > -CONFIG_NLS_ISO8859_1=y > -CONFIG_FONTS=y > -CONFIG_FONT_MINI_4x6=y > -# CONFIG_DEBUG_BUGVERBOSE is not set > -CONFIG_MAGIC_SYSRQ=y > -CONFIG_DEBUG_KERNEL=y > -# CONFIG_DETECT_SOFTLOCKUP is not set > -CONFIG_DEBUG_MUTEXES=y > diff --git a/arch/arm/configs/h3600_defconfig b/arch/arm/configs/h3600_defconfig > deleted file mode 100644 > index 3e8da62d959d..000000000000 > --- a/arch/arm/configs/h3600_defconfig > +++ /dev/null > @@ -1,63 +0,0 @@ > -CONFIG_SYSVIPC=y > -CONFIG_NO_HZ_IDLE=y > -CONFIG_HIGH_RES_TIMERS=y > -CONFIG_PREEMPT=y > -CONFIG_LOG_BUF_SHIFT=14 > -CONFIG_BLK_DEV_INITRD=y > -CONFIG_EXPERT=y > -CONFIG_ARCH_MULTI_V4=y > -# CONFIG_ARCH_MULTI_V7 is not set > -CONFIG_ARCH_SA1100=y > -CONFIG_SA1100_H3600=y > -# CONFIG_CPU_FREQ_STAT is not set > -CONFIG_ATAGS=y > -CONFIG_MODULES=y > -CONFIG_NET=y > -CONFIG_UNIX=y > -CONFIG_INET=y > -# CONFIG_IPV6 is not set > -# CONFIG_WIRELESS is not set > -CONFIG_PCCARD=y > -CONFIG_PCMCIA_SA1100=y > -CONFIG_MTD=y > -CONFIG_MTD_REDBOOT_PARTS=y > -CONFIG_MTD_BLOCK=y > -CONFIG_MTD_CFI=y > -CONFIG_MTD_CFI_ADV_OPTIONS=y > -CONFIG_MTD_CFI_GEOMETRY=y > -# CONFIG_MTD_CFI_I1 is not set > -CONFIG_MTD_CFI_INTELEXT=y > -CONFIG_MTD_SA1100=y > -CONFIG_BLK_DEV_LOOP=m > -CONFIG_BLK_DEV_RAM=y > -CONFIG_BLK_DEV_RAM_SIZE=8192 > -CONFIG_BLK_DEV_SD=y > -# CONFIG_BLK_DEV_BSG is not set > -CONFIG_ATA=y > -CONFIG_PATA_PCMCIA=y > -CONFIG_NETDEVICES=y > -CONFIG_PCMCIA_PCNET=y > -CONFIG_PPP=m > -CONFIG_PPP_BSDCOMP=m > -CONFIG_PPP_DEFLATE=m > -CONFIG_PPP_ASYNC=m > -# CONFIG_WLAN is not set > -# CONFIG_KEYBOARD_ATKBD is not set > -CONFIG_KEYBOARD_GPIO=y > -# CONFIG_INPUT_MOUSE is not set > -# CONFIG_SERIO is not set > -CONFIG_SERIAL_SA1100=y > -CONFIG_SERIAL_SA1100_CONSOLE=y > -# CONFIG_HW_RANDOM is not set > -# CONFIG_HWMON is not set > -CONFIG_FB=y > -CONFIG_FB_SA1100=y > -# CONFIG_USB_SUPPORT is not set > -CONFIG_EXT2_FS=y > -CONFIG_MSDOS_FS=m > -CONFIG_VFAT_FS=m > -CONFIG_JFFS2_FS=y > -CONFIG_CRAMFS=m > -CONFIG_NFS_FS=y > -CONFIG_NFSD=m > -CONFIG_NLS=y > diff --git a/arch/arm/configs/jornada720_defconfig b/arch/arm/configs/jornada720_defconfig > deleted file mode 100644 > index a96cfb81aba5..000000000000 > --- a/arch/arm/configs/jornada720_defconfig > +++ /dev/null > @@ -1,95 +0,0 @@ > -CONFIG_SYSVIPC=y > -CONFIG_LOG_BUF_SHIFT=14 > -CONFIG_EXPERT=y > -CONFIG_ARCH_MULTI_V4=y > -# CONFIG_ARCH_MULTI_V7 is not set > -CONFIG_ARCH_SA1100=y > -CONFIG_SA1100_JORNADA720=y > -CONFIG_SA1100_JORNADA720_SSP=y > -CONFIG_PM=y > -CONFIG_ATAGS=y > -CONFIG_MODULES=y > -CONFIG_NET=y > -CONFIG_PACKET=y > -CONFIG_UNIX=y > -CONFIG_INET=y > -CONFIG_IP_MULTICAST=y > -# CONFIG_IPV6 is not set > -CONFIG_NETFILTER=y > -CONFIG_PCCARD=y > -CONFIG_PCMCIA_SA1100=y > -CONFIG_BLK_DEV_LOOP=y > -CONFIG_BLK_DEV_NBD=y > -CONFIG_BLK_DEV_SD=y > -# CONFIG_BLK_DEV_BSG is not set > -CONFIG_ATA=y > -CONFIG_PATA_PCMCIA=y > -CONFIG_NETDEVICES=y > -CONFIG_DUMMY=y > -CONFIG_NET_PCMCIA=y > -CONFIG_INPUT_MOUSEDEV_SCREEN_X=640 > -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=240 > -# CONFIG_KEYBOARD_ATKBD is not set > -CONFIG_KEYBOARD_HP7XX=y > -# CONFIG_INPUT_MOUSE is not set > -CONFIG_INPUT_TOUCHSCREEN=y > -CONFIG_TOUCHSCREEN_HP7XX=y > -CONFIG_LEGACY_PTY_COUNT=32 > -CONFIG_SERIAL_SA1100=y > -CONFIG_SERIAL_SA1100_CONSOLE=y > -# CONFIG_HWMON is not set > -CONFIG_FB=y > -CONFIG_FB_S1D13XXX=y > -CONFIG_LCD_CLASS_DEVICE=y > -CONFIG_BACKLIGHT_CLASS_DEVICE=y > -# CONFIG_VGA_CONSOLE is not set > -CONFIG_FRAMEBUFFER_CONSOLE=y > -CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y > -# CONFIG_USB_SUPPORT is not set > -CONFIG_RTC_CLASS=y > -CONFIG_RTC_DRV_SA1100=y > -CONFIG_EXT2_FS=y > -CONFIG_MSDOS_FS=y > -CONFIG_VFAT_FS=y > -# CONFIG_NETWORK_FILESYSTEMS is not set > -CONFIG_NLS_CODEPAGE_437=m > -CONFIG_NLS_CODEPAGE_737=m > -CONFIG_NLS_CODEPAGE_775=m > -CONFIG_NLS_CODEPAGE_850=m > -CONFIG_NLS_CODEPAGE_852=m > -CONFIG_NLS_CODEPAGE_855=m > -CONFIG_NLS_CODEPAGE_857=m > -CONFIG_NLS_CODEPAGE_860=m > -CONFIG_NLS_CODEPAGE_861=m > -CONFIG_NLS_CODEPAGE_862=m > -CONFIG_NLS_CODEPAGE_863=m > -CONFIG_NLS_CODEPAGE_864=m > -CONFIG_NLS_CODEPAGE_865=m > -CONFIG_NLS_CODEPAGE_866=m > -CONFIG_NLS_CODEPAGE_869=m > -CONFIG_NLS_CODEPAGE_936=m > -CONFIG_NLS_CODEPAGE_950=m > -CONFIG_NLS_CODEPAGE_932=m > -CONFIG_NLS_CODEPAGE_949=m > -CONFIG_NLS_CODEPAGE_874=m > -CONFIG_NLS_ISO8859_8=m > -CONFIG_NLS_CODEPAGE_1250=m > -CONFIG_NLS_CODEPAGE_1251=m > -CONFIG_NLS_ASCII=m > -CONFIG_NLS_ISO8859_1=m > -CONFIG_NLS_ISO8859_2=m > -CONFIG_NLS_ISO8859_3=m > -CONFIG_NLS_ISO8859_4=m > -CONFIG_NLS_ISO8859_5=m > -CONFIG_NLS_ISO8859_6=m > -CONFIG_NLS_ISO8859_7=m > -CONFIG_NLS_ISO8859_9=m > -CONFIG_NLS_ISO8859_13=m > -CONFIG_NLS_ISO8859_14=m > -CONFIG_NLS_ISO8859_15=m > -CONFIG_NLS_KOI8_R=m > -CONFIG_NLS_KOI8_U=m > -CONFIG_NLS_UTF8=m > -CONFIG_DEBUG_KERNEL=y > -# CONFIG_FTRACE is not set > -CONFIG_DEBUG_LL=y > diff --git a/arch/arm/configs/neponset_defconfig b/arch/arm/configs/neponset_defconfig > deleted file mode 100644 > index 164643f1b6c0..000000000000 > --- a/arch/arm/configs/neponset_defconfig > +++ /dev/null > @@ -1,88 +0,0 @@ > -CONFIG_SYSVIPC=y > -CONFIG_LOG_BUF_SHIFT=14 > -CONFIG_BLK_DEV_INITRD=y > -CONFIG_EXPERT=y > -CONFIG_ARCH_MULTI_V4=y > -# CONFIG_ARCH_MULTI_V7 is not set > -CONFIG_ARCH_SA1100=y > -CONFIG_SA1100_ASSABET=y > -CONFIG_ASSABET_NEPONSET=y > -CONFIG_ATAGS=y > -CONFIG_ZBOOT_ROM_TEXT=0x80000 > -CONFIG_ZBOOT_ROM_BSS=0xc1000000 > -CONFIG_ZBOOT_ROM=y > -CONFIG_CMDLINE="console=ttySA0,38400n8 cpufreq=221200 rw root=/dev/mtdblock2 mtdparts=sa1100:512K(boot),1M(kernel),2560K(initrd),4M(root) mem=32M noinitrd initrd=0xc0800000,3M" > -CONFIG_FPE_NWFPE=y > -# CONFIG_AEABI is not set > -CONFIG_PM=y > -CONFIG_MODULES=y > -CONFIG_MODULE_UNLOAD=y > -CONFIG_PARTITION_ADVANCED=y > -# CONFIG_MSDOS_PARTITION is not set > -CONFIG_NET=y > -CONFIG_PACKET=y > -CONFIG_UNIX=y > -CONFIG_INET=y > -# CONFIG_IPV6 is not set > -CONFIG_PCCARD=y > -CONFIG_PCMCIA_SA1100=y > -CONFIG_PCMCIA_SA1111=y > -CONFIG_MTD=y > -CONFIG_MTD_CMDLINE_PARTS=y > -CONFIG_MTD_REDBOOT_PARTS=y > -CONFIG_MTD_BLOCK=y > -CONFIG_MTD_CFI=y > -CONFIG_MTD_CFI_ADV_OPTIONS=y > -CONFIG_MTD_CFI_INTELEXT=y > -CONFIG_MTD_RAM=y > -CONFIG_MTD_SA1100=y > -CONFIG_BLK_DEV_RAM=y > -CONFIG_BLK_DEV_RAM_SIZE=8192 > -CONFIG_SCSI=m > -CONFIG_BLK_DEV_SD=m > -CONFIG_NETDEVICES=y > -CONFIG_NET_VENDOR_SMC=y > -CONFIG_PCMCIA_PCNET=y > -CONFIG_SMC91X=y > -CONFIG_NET_PCMCIA=y > -# CONFIG_INPUT_MOUSE is not set > -CONFIG_INPUT_TOUCHSCREEN=y > -CONFIG_SERIO_SERPORT=m > -CONFIG_SERIO_SA1111=y > -CONFIG_LEGACY_PTY_COUNT=64 > -CONFIG_SERIAL_8250=y > -CONFIG_SERIAL_8250_CS=y > -CONFIG_SERIAL_SA1100=y > -CONFIG_SERIAL_SA1100_CONSOLE=y > -CONFIG_SERIAL_NONSTANDARD=y > -CONFIG_I2C=y > -CONFIG_I2C_CHARDEV=y > -CONFIG_WATCHDOG=y > -CONFIG_SA1100_WATCHDOG=m > -CONFIG_FB=y > -CONFIG_FB_SA1100=y > -# CONFIG_VGA_CONSOLE is not set > -CONFIG_FRAMEBUFFER_CONSOLE=y > -CONFIG_SOUND=y > -CONFIG_SOUND_PRIME=y > -# CONFIG_USB_HID is not set > -CONFIG_USB=m > -CONFIG_USB_MON=m > -CONFIG_USB_OHCI_HCD=m > -CONFIG_USB_STORAGE=m > -CONFIG_NEW_LEDS=y > -CONFIG_LEDS_CLASS=y > -CONFIG_LEDS_TRIGGERS=y > -CONFIG_LEDS_TRIGGER_CPU=y > -CONFIG_EXT2_FS=y > -CONFIG_MSDOS_FS=m > -CONFIG_VFAT_FS=m > -CONFIG_JFFS2_FS=y > -CONFIG_NFS_FS=y > -CONFIG_NLS=y > -CONFIG_NLS_CODEPAGE_437=m > -CONFIG_NLS_ISO8859_1=m > -CONFIG_DEBUG_KERNEL=y > -CONFIG_MAGIC_SYSRQ=y > -CONFIG_DEBUG_USER=y > -CONFIG_DEBUG_LL=y > diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h > index 0163c3e78a67..d58f6b5c4c35 100644 > --- a/arch/arm/include/asm/cputype.h > +++ b/arch/arm/include/asm/cputype.h > @@ -262,10 +262,6 @@ static inline unsigned int __attribute_const__ read_cpuid_mpidr(void) > return read_cpuid(CPUID_MPIDR); > } > > -/* StrongARM-11x0 CPUs */ > -#define cpu_is_sa1100() (read_cpuid_part() == ARM_CPU_PART_SA1100) > -#define cpu_is_sa1110() (read_cpuid_part() == ARM_CPU_PART_SA1110) > - > /* > * Intel's XScale3 core supports some v6 features (supersections, L2) > * but advertises itself as v5 as it does not support the v6 ISA. For > diff --git a/arch/arm/include/asm/hardware/locomo.h b/arch/arm/include/asm/hardware/locomo.h > deleted file mode 100644 > index 3190e1e5067a..000000000000 > --- a/arch/arm/include/asm/hardware/locomo.h > +++ /dev/null > @@ -1,217 +0,0 @@ > -/* > - * arch/arm/include/asm/hardware/locomo.h > - * > - * This file contains the definitions for the LoCoMo G/A Chip > - * > - * (C) Copyright 2004 John Lenz > - * > - * May be copied or modified under the terms of the GNU General Public > - * License. See linux/COPYING for more information. > - * > - * Based on sa1111.h > - */ > -#ifndef _ASM_ARCH_LOCOMO > -#define _ASM_ARCH_LOCOMO > - > -#define locomo_writel(val,addr) ({ *(volatile u16 *)(addr) = (val); }) > -#define locomo_readl(addr) (*(volatile u16 *)(addr)) > - > -/* LOCOMO version */ > -#define LOCOMO_VER 0x00 > - > -/* Pin status */ > -#define LOCOMO_ST 0x04 > - > -/* Pin status */ > -#define LOCOMO_C32K 0x08 > - > -/* Interrupt controller */ > -#define LOCOMO_ICR 0x0C > - > -/* MCS decoder for boot selecting */ > -#define LOCOMO_MCSX0 0x10 > -#define LOCOMO_MCSX1 0x14 > -#define LOCOMO_MCSX2 0x18 > -#define LOCOMO_MCSX3 0x1c > - > -/* Touch panel controller */ > -#define LOCOMO_ASD 0x20 /* AD start delay */ > -#define LOCOMO_HSD 0x28 /* HSYS delay */ > -#define LOCOMO_HSC 0x2c /* HSYS period */ > -#define LOCOMO_TADC 0x30 /* tablet ADC clock */ > - > - > -/* Long time timer */ > -#define LOCOMO_LTC 0xd8 /* LTC interrupt setting */ > -#define LOCOMO_LTINT 0xdc /* LTC interrupt */ > - > -/* DAC control signal for LCD (COMADJ ) */ > -#define LOCOMO_DAC 0xe0 > -/* DAC control */ > -#define LOCOMO_DAC_SCLOEB 0x08 /* SCL pin output data */ > -#define LOCOMO_DAC_TEST 0x04 /* Test bit */ > -#define LOCOMO_DAC_SDA 0x02 /* SDA pin level (read-only) */ > -#define LOCOMO_DAC_SDAOEB 0x01 /* SDA pin output data */ > - > -/* SPI interface */ > -#define LOCOMO_SPI 0x60 > -#define LOCOMO_SPIMD 0x00 /* SPI mode setting */ > -#define LOCOMO_SPICT 0x04 /* SPI mode control */ > -#define LOCOMO_SPIST 0x08 /* SPI status */ > -#define LOCOMO_SPI_TEND (1 << 3) /* Transfer end bit */ > -#define LOCOMO_SPI_REND (1 << 2) /* Receive end bit */ > -#define LOCOMO_SPI_RFW (1 << 1) /* write buffer bit */ > -#define LOCOMO_SPI_RFR (1) /* read buffer bit */ > - > -#define LOCOMO_SPIIS 0x10 /* SPI interrupt status */ > -#define LOCOMO_SPIWE 0x14 /* SPI interrupt status write enable */ > -#define LOCOMO_SPIIE 0x18 /* SPI interrupt enable */ > -#define LOCOMO_SPIIR 0x1c /* SPI interrupt request */ > -#define LOCOMO_SPITD 0x20 /* SPI transfer data write */ > -#define LOCOMO_SPIRD 0x24 /* SPI receive data read */ > -#define LOCOMO_SPITS 0x28 /* SPI transfer data shift */ > -#define LOCOMO_SPIRS 0x2C /* SPI receive data shift */ > - > -/* GPIO */ > -#define LOCOMO_GPD 0x90 /* GPIO direction */ > -#define LOCOMO_GPE 0x94 /* GPIO input enable */ > -#define LOCOMO_GPL 0x98 /* GPIO level */ > -#define LOCOMO_GPO 0x9c /* GPIO out data setting */ > -#define LOCOMO_GRIE 0xa0 /* GPIO rise detection */ > -#define LOCOMO_GFIE 0xa4 /* GPIO fall detection */ > -#define LOCOMO_GIS 0xa8 /* GPIO edge detection status */ > -#define LOCOMO_GWE 0xac /* GPIO status write enable */ > -#define LOCOMO_GIE 0xb0 /* GPIO interrupt enable */ > -#define LOCOMO_GIR 0xb4 /* GPIO interrupt request */ > -#define LOCOMO_GPIO(Nb) (0x01 << (Nb)) > -#define LOCOMO_GPIO_RTS LOCOMO_GPIO(0) > -#define LOCOMO_GPIO_CTS LOCOMO_GPIO(1) > -#define LOCOMO_GPIO_DSR LOCOMO_GPIO(2) > -#define LOCOMO_GPIO_DTR LOCOMO_GPIO(3) > -#define LOCOMO_GPIO_LCD_VSHA_ON LOCOMO_GPIO(4) > -#define LOCOMO_GPIO_LCD_VSHD_ON LOCOMO_GPIO(5) > -#define LOCOMO_GPIO_LCD_VEE_ON LOCOMO_GPIO(6) > -#define LOCOMO_GPIO_LCD_MOD LOCOMO_GPIO(7) > -#define LOCOMO_GPIO_DAC_ON LOCOMO_GPIO(8) > -#define LOCOMO_GPIO_FL_VR LOCOMO_GPIO(9) > -#define LOCOMO_GPIO_DAC_SDATA LOCOMO_GPIO(10) > -#define LOCOMO_GPIO_DAC_SCK LOCOMO_GPIO(11) > -#define LOCOMO_GPIO_DAC_SLOAD LOCOMO_GPIO(12) > -#define LOCOMO_GPIO_CARD_DETECT LOCOMO_GPIO(13) > -#define LOCOMO_GPIO_WRITE_PROT LOCOMO_GPIO(14) > -#define LOCOMO_GPIO_CARD_POWER LOCOMO_GPIO(15) > - > -/* Start the definitions of the devices. Each device has an initial > - * base address and a series of offsets from that base address. */ > - > -/* Keyboard controller */ > -#define LOCOMO_KEYBOARD 0x40 > -#define LOCOMO_KIB 0x00 /* KIB level */ > -#define LOCOMO_KSC 0x04 /* KSTRB control */ > -#define LOCOMO_KCMD 0x08 /* KSTRB command */ > -#define LOCOMO_KIC 0x0c /* Key interrupt */ > - > -/* Front light adjustment controller */ > -#define LOCOMO_FRONTLIGHT 0xc8 > -#define LOCOMO_ALS 0x00 /* Adjust light cycle */ > -#define LOCOMO_ALD 0x04 /* Adjust light duty */ > - > -#define LOCOMO_ALC_EN 0x8000 > - > -/* Backlight controller: TFT signal */ > -#define LOCOMO_BACKLIGHT 0x38 > -#define LOCOMO_TC 0x00 /* TFT control signal */ > -#define LOCOMO_CPSD 0x04 /* CPS delay */ > - > -/* Audio controller */ > -#define LOCOMO_AUDIO 0x54 > -#define LOCOMO_ACC 0x00 /* Audio clock */ > -#define LOCOMO_PAIF 0xD0 /* PCM audio interface */ > -/* Audio clock */ > -#define LOCOMO_ACC_XON 0x80 > -#define LOCOMO_ACC_XEN 0x40 > -#define LOCOMO_ACC_XSEL0 0x00 > -#define LOCOMO_ACC_XSEL1 0x20 > -#define LOCOMO_ACC_MCLKEN 0x10 > -#define LOCOMO_ACC_64FSEN 0x08 > -#define LOCOMO_ACC_CLKSEL000 0x00 /* mclk 2 */ > -#define LOCOMO_ACC_CLKSEL001 0x01 /* mclk 3 */ > -#define LOCOMO_ACC_CLKSEL010 0x02 /* mclk 4 */ > -#define LOCOMO_ACC_CLKSEL011 0x03 /* mclk 6 */ > -#define LOCOMO_ACC_CLKSEL100 0x04 /* mclk 8 */ > -#define LOCOMO_ACC_CLKSEL101 0x05 /* mclk 12 */ > -/* PCM audio interface */ > -#define LOCOMO_PAIF_SCINV 0x20 > -#define LOCOMO_PAIF_SCEN 0x10 > -#define LOCOMO_PAIF_LRCRST 0x08 > -#define LOCOMO_PAIF_LRCEVE 0x04 > -#define LOCOMO_PAIF_LRCINV 0x02 > -#define LOCOMO_PAIF_LRCEN 0x01 > - > -/* LED controller */ > -#define LOCOMO_LED 0xe8 > -#define LOCOMO_LPT0 0x00 > -#define LOCOMO_LPT1 0x04 > -/* LED control */ > -#define LOCOMO_LPT_TOFH 0x80 > -#define LOCOMO_LPT_TOFL 0x08 > -#define LOCOMO_LPT_TOH(TOH) ((TOH & 0x7) << 4) > -#define LOCOMO_LPT_TOL(TOL) ((TOL & 0x7)) > - > -#define LOCOMO_DEVID_KEYBOARD 0 > -#define LOCOMO_DEVID_FRONTLIGHT 1 > -#define LOCOMO_DEVID_BACKLIGHT 2 > -#define LOCOMO_DEVID_AUDIO 3 > -#define LOCOMO_DEVID_LED 4 > -#define LOCOMO_DEVID_UART 5 > -#define LOCOMO_DEVID_SPI 6 > - > -struct locomo_dev { > - struct device dev; > - unsigned int devid; > - unsigned int irq[1]; > - > - void *mapbase; > - unsigned long length; > - > - u64 dma_mask; > -}; > - > -#define LOCOMO_DEV(_d) container_of((_d), struct locomo_dev, dev) > - > -#define locomo_get_drvdata(d) dev_get_drvdata(&(d)->dev) > -#define locomo_set_drvdata(d,p) dev_set_drvdata(&(d)->dev, p) > - > -struct locomo_driver { > - struct device_driver drv; > - unsigned int devid; > - int (*probe)(struct locomo_dev *); > - void (*remove)(struct locomo_dev *); > -}; > - > -#define LOCOMO_DRV(_d) container_of_const((_d), struct locomo_driver, drv) > - > -#define LOCOMO_DRIVER_NAME(_ldev) ((_ldev)->dev.driver->name) > - > -extern void locomolcd_power(int on); > - > -int locomo_driver_register(struct locomo_driver *); > -void locomo_driver_unregister(struct locomo_driver *); > - > -/* GPIO control functions */ > -void locomo_gpio_set_dir(struct device *dev, unsigned int bits, unsigned int dir); > -int locomo_gpio_read_level(struct device *dev, unsigned int bits); > -int locomo_gpio_read_output(struct device *dev, unsigned int bits); > -void locomo_gpio_write(struct device *dev, unsigned int bits, unsigned int set); > - > -/* M62332 control function */ > -void locomo_m62332_senddata(struct locomo_dev *ldev, unsigned int dac_data, int channel); > - > -/* Frontlight control */ > -void locomo_frontlight_set(struct locomo_dev *dev, int duty, int vr, int bpwf); > - > -struct locomo_platform_data { > - int irq_base; /* IRQ base for cascaded on-chip IRQs */ > -}; > - > -#endif > diff --git a/arch/arm/include/asm/hardware/sa1111.h b/arch/arm/include/asm/hardware/sa1111.h > deleted file mode 100644 > index 90b6a832108d..000000000000 > --- a/arch/arm/include/asm/hardware/sa1111.h > +++ /dev/null > @@ -1,442 +0,0 @@ > -/* SPDX-License-Identifier: GPL-2.0 */ > -/* > - * arch/arm/include/asm/hardware/sa1111.h > - * > - * Copyright (C) 2000 John G Dorsey > - * > - * This file contains definitions for the SA-1111 Companion Chip. > - * (Structure and naming borrowed from SA-1101.h, by Peter Danielsson.) > - * > - * Macro that calculates real address for registers in the SA-1111 > - */ > - > -#ifndef _ASM_ARCH_SA1111 > -#define _ASM_ARCH_SA1111 > - > -/* > - * Don't ask the (SAC) DMA engines to move less than this amount. > - */ > - > -#define SA1111_SAC_DMA_MIN_XFER (0x800) > - > -/* > - * System Bus Interface (SBI) > - * > - * Registers > - * SKCR Control Register > - * SMCR Shared Memory Controller Register > - * SKID ID Register > - */ > -#define SA1111_SKCR 0x0000 > -#define SA1111_SMCR 0x0004 > -#define SA1111_SKID 0x0008 > - > -#define SKCR_PLL_BYPASS (1<<0) > -#define SKCR_RCLKEN (1<<1) > -#define SKCR_SLEEP (1<<2) > -#define SKCR_DOZE (1<<3) > -#define SKCR_VCO_OFF (1<<4) > -#define SKCR_SCANTSTEN (1<<5) > -#define SKCR_CLKTSTEN (1<<6) > -#define SKCR_RDYEN (1<<7) > -#define SKCR_SELAC (1<<8) > -#define SKCR_OPPC (1<<9) > -#define SKCR_PLLTSTEN (1<<10) > -#define SKCR_USBIOTSTEN (1<<11) > -/* > - * Don't believe the specs! Take them, throw them outside. Leave them > - * there for a week. Spit on them. Walk on them. Stamp on them. > - * Pour gasoline over them and finally burn them. Now think about coding. > - * - The October 1999 errata (278260-007) says its bit 13, 1 to enable. > - * - The Feb 2001 errata (278260-010) says that the previous errata > - * (278260-009) is wrong, and its bit actually 12, fixed in spec > - * 278242-003. > - * - The SA1111 manual (278242) says bit 12, but 0 to enable. > - * - Reality is bit 13, 1 to enable. > - * -- rmk > - */ > -#define SKCR_OE_EN (1<<13) > - > -#define SMCR_DTIM (1<<0) > -#define SMCR_MBGE (1<<1) > -#define SMCR_DRAC_0 (1<<2) > -#define SMCR_DRAC_1 (1<<3) > -#define SMCR_DRAC_2 (1<<4) > -#define SMCR_DRAC Fld(3, 2) > -#define SMCR_CLAT (1<<5) > - > -#define SKID_SIREV_MASK (0x000000f0) > -#define SKID_MTREV_MASK (0x0000000f) > -#define SKID_ID_MASK (0xffffff00) > -#define SKID_SA1111_ID (0x690cc200) > - > -/* > - * System Controller > - * > - * Registers > - * SKPCR Power Control Register > - * SKCDR Clock Divider Register > - * SKAUD Audio Clock Divider Register > - * SKPMC PS/2 Mouse Clock Divider Register > - * SKPTC PS/2 Track Pad Clock Divider Register > - * SKPEN0 PWM0 Enable Register > - * SKPWM0 PWM0 Clock Register > - * SKPEN1 PWM1 Enable Register > - * SKPWM1 PWM1 Clock Register > - */ > -#define SA1111_SKPCR 0x0200 > -#define SA1111_SKCDR 0x0204 > -#define SA1111_SKAUD 0x0208 > -#define SA1111_SKPMC 0x020c > -#define SA1111_SKPTC 0x0210 > -#define SA1111_SKPEN0 0x0214 > -#define SA1111_SKPWM0 0x0218 > -#define SA1111_SKPEN1 0x021c > -#define SA1111_SKPWM1 0x0220 > - > -#define SKPCR_UCLKEN (1<<0) > -#define SKPCR_ACCLKEN (1<<1) > -#define SKPCR_I2SCLKEN (1<<2) > -#define SKPCR_L3CLKEN (1<<3) > -#define SKPCR_SCLKEN (1<<4) > -#define SKPCR_PMCLKEN (1<<5) > -#define SKPCR_PTCLKEN (1<<6) > -#define SKPCR_DCLKEN (1<<7) > -#define SKPCR_PWMCLKEN (1<<8) > - > -/* USB Host controller */ > -#define SA1111_USB 0x0400 > - > -/* > - * Serial Audio Controller > - * > - * Registers > - * SACR0 Serial Audio Common Control Register > - * SACR1 Serial Audio Alternate Mode (I2C/MSB) Control Register > - * SACR2 Serial Audio AC-link Control Register > - * SASR0 Serial Audio I2S/MSB Interface & FIFO Status Register > - * SASR1 Serial Audio AC-link Interface & FIFO Status Register > - * SASCR Serial Audio Status Clear Register > - * L3_CAR L3 Control Bus Address Register > - * L3_CDR L3 Control Bus Data Register > - * ACCAR AC-link Command Address Register > - * ACCDR AC-link Command Data Register > - * ACSAR AC-link Status Address Register > - * ACSDR AC-link Status Data Register > - * SADTCS Serial Audio DMA Transmit Control/Status Register > - * SADTSA Serial Audio DMA Transmit Buffer Start Address A > - * SADTCA Serial Audio DMA Transmit Buffer Count Register A > - * SADTSB Serial Audio DMA Transmit Buffer Start Address B > - * SADTCB Serial Audio DMA Transmit Buffer Count Register B > - * SADRCS Serial Audio DMA Receive Control/Status Register > - * SADRSA Serial Audio DMA Receive Buffer Start Address A > - * SADRCA Serial Audio DMA Receive Buffer Count Register A > - * SADRSB Serial Audio DMA Receive Buffer Start Address B > - * SADRCB Serial Audio DMA Receive Buffer Count Register B > - * SAITR Serial Audio Interrupt Test Register > - * SADR Serial Audio Data Register (16 x 32-bit) > - */ > - > -#define SA1111_SERAUDIO 0x0600 > - > -/* > - * These are offsets from the above base. > - */ > -#define SA1111_SACR0 0x00 > -#define SA1111_SACR1 0x04 > -#define SA1111_SACR2 0x08 > -#define SA1111_SASR0 0x0c > -#define SA1111_SASR1 0x10 > -#define SA1111_SASCR 0x18 > -#define SA1111_L3_CAR 0x1c > -#define SA1111_L3_CDR 0x20 > -#define SA1111_ACCAR 0x24 > -#define SA1111_ACCDR 0x28 > -#define SA1111_ACSAR 0x2c > -#define SA1111_ACSDR 0x30 > -#define SA1111_SADTCS 0x34 > -#define SA1111_SADTSA 0x38 > -#define SA1111_SADTCA 0x3c > -#define SA1111_SADTSB 0x40 > -#define SA1111_SADTCB 0x44 > -#define SA1111_SADRCS 0x48 > -#define SA1111_SADRSA 0x4c > -#define SA1111_SADRCA 0x50 > -#define SA1111_SADRSB 0x54 > -#define SA1111_SADRCB 0x58 > -#define SA1111_SAITR 0x5c > -#define SA1111_SADR 0x80 > - > -#ifndef CONFIG_ARCH_PXA > - > -#define SACR0_ENB (1<<0) > -#define SACR0_BCKD (1<<2) > -#define SACR0_RST (1<<3) > - > -#define SACR1_AMSL (1<<0) > -#define SACR1_L3EN (1<<1) > -#define SACR1_L3MB (1<<2) > -#define SACR1_DREC (1<<3) > -#define SACR1_DRPL (1<<4) > -#define SACR1_ENLBF (1<<5) > - > -#define SACR2_TS3V (1<<0) > -#define SACR2_TS4V (1<<1) > -#define SACR2_WKUP (1<<2) > -#define SACR2_DREC (1<<3) > -#define SACR2_DRPL (1<<4) > -#define SACR2_ENLBF (1<<5) > -#define SACR2_RESET (1<<6) > - > -#define SASR0_TNF (1<<0) > -#define SASR0_RNE (1<<1) > -#define SASR0_BSY (1<<2) > -#define SASR0_TFS (1<<3) > -#define SASR0_RFS (1<<4) > -#define SASR0_TUR (1<<5) > -#define SASR0_ROR (1<<6) > -#define SASR0_L3WD (1<<16) > -#define SASR0_L3RD (1<<17) > - > -#define SASR1_TNF (1<<0) > -#define SASR1_RNE (1<<1) > -#define SASR1_BSY (1<<2) > -#define SASR1_TFS (1<<3) > -#define SASR1_RFS (1<<4) > -#define SASR1_TUR (1<<5) > -#define SASR1_ROR (1<<6) > -#define SASR1_CADT (1<<16) > -#define SASR1_SADR (1<<17) > -#define SASR1_RSTO (1<<18) > -#define SASR1_CLPM (1<<19) > -#define SASR1_CRDY (1<<20) > -#define SASR1_RS3V (1<<21) > -#define SASR1_RS4V (1<<22) > - > -#define SASCR_TUR (1<<5) > -#define SASCR_ROR (1<<6) > -#define SASCR_DTS (1<<16) > -#define SASCR_RDD (1<<17) > -#define SASCR_STO (1<<18) > - > -#define SADTCS_TDEN (1<<0) > -#define SADTCS_TDIE (1<<1) > -#define SADTCS_TDBDA (1<<3) > -#define SADTCS_TDSTA (1<<4) > -#define SADTCS_TDBDB (1<<5) > -#define SADTCS_TDSTB (1<<6) > -#define SADTCS_TBIU (1<<7) > - > -#define SADRCS_RDEN (1<<0) > -#define SADRCS_RDIE (1<<1) > -#define SADRCS_RDBDA (1<<3) > -#define SADRCS_RDSTA (1<<4) > -#define SADRCS_RDBDB (1<<5) > -#define SADRCS_RDSTB (1<<6) > -#define SADRCS_RBIU (1<<7) > - > -#define SAD_CS_DEN (1<<0) > -#define SAD_CS_DIE (1<<1) /* Not functional on metal 1 */ > -#define SAD_CS_DBDA (1<<3) /* Not functional on metal 1 */ > -#define SAD_CS_DSTA (1<<4) > -#define SAD_CS_DBDB (1<<5) /* Not functional on metal 1 */ > -#define SAD_CS_DSTB (1<<6) > -#define SAD_CS_BIU (1<<7) /* Not functional on metal 1 */ > - > -#define SAITR_TFS (1<<0) > -#define SAITR_RFS (1<<1) > -#define SAITR_TUR (1<<2) > -#define SAITR_ROR (1<<3) > -#define SAITR_CADT (1<<4) > -#define SAITR_SADR (1<<5) > -#define SAITR_RSTO (1<<6) > -#define SAITR_TDBDA (1<<8) > -#define SAITR_TDBDB (1<<9) > -#define SAITR_RDBDA (1<<10) > -#define SAITR_RDBDB (1<<11) > - > -#endif /* !CONFIG_ARCH_PXA */ > - > -/* > - * General-Purpose I/O Interface > - * > - * Registers > - * PA_DDR GPIO Block A Data Direction > - * PA_DRR/PA_DWR GPIO Block A Data Value Register (read/write) > - * PA_SDR GPIO Block A Sleep Direction > - * PA_SSR GPIO Block A Sleep State > - * PB_DDR GPIO Block B Data Direction > - * PB_DRR/PB_DWR GPIO Block B Data Value Register (read/write) > - * PB_SDR GPIO Block B Sleep Direction > - * PB_SSR GPIO Block B Sleep State > - * PC_DDR GPIO Block C Data Direction > - * PC_DRR/PC_DWR GPIO Block C Data Value Register (read/write) > - * PC_SDR GPIO Block C Sleep Direction > - * PC_SSR GPIO Block C Sleep State > - */ > - > -#define SA1111_GPIO 0x1000 > - > -#define SA1111_GPIO_PADDR (0x000) > -#define SA1111_GPIO_PADRR (0x004) > -#define SA1111_GPIO_PADWR (0x004) > -#define SA1111_GPIO_PASDR (0x008) > -#define SA1111_GPIO_PASSR (0x00c) > -#define SA1111_GPIO_PBDDR (0x010) > -#define SA1111_GPIO_PBDRR (0x014) > -#define SA1111_GPIO_PBDWR (0x014) > -#define SA1111_GPIO_PBSDR (0x018) > -#define SA1111_GPIO_PBSSR (0x01c) > -#define SA1111_GPIO_PCDDR (0x020) > -#define SA1111_GPIO_PCDRR (0x024) > -#define SA1111_GPIO_PCDWR (0x024) > -#define SA1111_GPIO_PCSDR (0x028) > -#define SA1111_GPIO_PCSSR (0x02c) > - > -#define GPIO_A0 (1 << 0) > -#define GPIO_A1 (1 << 1) > -#define GPIO_A2 (1 << 2) > -#define GPIO_A3 (1 << 3) > - > -#define GPIO_B0 (1 << 8) > -#define GPIO_B1 (1 << 9) > -#define GPIO_B2 (1 << 10) > -#define GPIO_B3 (1 << 11) > -#define GPIO_B4 (1 << 12) > -#define GPIO_B5 (1 << 13) > -#define GPIO_B6 (1 << 14) > -#define GPIO_B7 (1 << 15) > - > -#define GPIO_C0 (1 << 16) > -#define GPIO_C1 (1 << 17) > -#define GPIO_C2 (1 << 18) > -#define GPIO_C3 (1 << 19) > -#define GPIO_C4 (1 << 20) > -#define GPIO_C5 (1 << 21) > -#define GPIO_C6 (1 << 22) > -#define GPIO_C7 (1 << 23) > - > -/* > - * Interrupt Controller > - * > - * Registers > - * INTTEST0 Test register 0 > - * INTTEST1 Test register 1 > - * INTEN0 Interrupt Enable register 0 > - * INTEN1 Interrupt Enable register 1 > - * INTPOL0 Interrupt Polarity selection 0 > - * INTPOL1 Interrupt Polarity selection 1 > - * INTTSTSEL Interrupt source selection > - * INTSTATCLR0 Interrupt Status/Clear 0 > - * INTSTATCLR1 Interrupt Status/Clear 1 > - * INTSET0 Interrupt source set 0 > - * INTSET1 Interrupt source set 1 > - * WAKE_EN0 Wake-up source enable 0 > - * WAKE_EN1 Wake-up source enable 1 > - * WAKE_POL0 Wake-up polarity selection 0 > - * WAKE_POL1 Wake-up polarity selection 1 > - */ > -#define SA1111_INTC 0x1600 > - > -/* > - * These are offsets from the above base. > - */ > -#define SA1111_INTTEST0 0x0000 > -#define SA1111_INTTEST1 0x0004 > -#define SA1111_INTEN0 0x0008 > -#define SA1111_INTEN1 0x000c > -#define SA1111_INTPOL0 0x0010 > -#define SA1111_INTPOL1 0x0014 > -#define SA1111_INTTSTSEL 0x0018 > -#define SA1111_INTSTATCLR0 0x001c > -#define SA1111_INTSTATCLR1 0x0020 > -#define SA1111_INTSET0 0x0024 > -#define SA1111_INTSET1 0x0028 > -#define SA1111_WAKEEN0 0x002c > -#define SA1111_WAKEEN1 0x0030 > -#define SA1111_WAKEPOL0 0x0034 > -#define SA1111_WAKEPOL1 0x0038 > - > -/* PS/2 Trackpad and Mouse Interfaces */ > -#define SA1111_KBD 0x0a00 > -#define SA1111_MSE 0x0c00 > - > -/* PCMCIA Interface */ > -#define SA1111_PCMCIA 0x1600 > - > - > - > - > - > -extern const struct bus_type sa1111_bus_type; > - > -#define SA1111_DEVID_SBI (1 << 0) > -#define SA1111_DEVID_SK (1 << 1) > -#define SA1111_DEVID_USB (1 << 2) > -#define SA1111_DEVID_SAC (1 << 3) > -#define SA1111_DEVID_SSP (1 << 4) > -#define SA1111_DEVID_PS2 (3 << 5) > -#define SA1111_DEVID_PS2_KBD (1 << 5) > -#define SA1111_DEVID_PS2_MSE (1 << 6) > -#define SA1111_DEVID_GPIO (1 << 7) > -#define SA1111_DEVID_INT (1 << 8) > -#define SA1111_DEVID_PCMCIA (1 << 9) > - > -struct sa1111_dev { > - struct device dev; > - unsigned int devid; > - struct resource res; > - void __iomem *mapbase; > - unsigned int skpcr_mask; > - unsigned int hwirq[6]; > - u64 dma_mask; > -}; > - > -#define to_sa1111_device(x) container_of(x, struct sa1111_dev, dev) > - > -#define sa1111_get_drvdata(d) dev_get_drvdata(&(d)->dev) > -#define sa1111_set_drvdata(d,p) dev_set_drvdata(&(d)->dev, p) > - > -struct sa1111_driver { > - struct device_driver drv; > - unsigned int devid; > - int (*probe)(struct sa1111_dev *); > - void (*remove)(struct sa1111_dev *); > -}; > - > -#define SA1111_DRV(_d) container_of_const((_d), struct sa1111_driver, drv) > - > -#define SA1111_DRIVER_NAME(_sadev) ((_sadev)->dev.driver->name) > - > -/* > - * These frob the SKPCR register, and call platform specific > - * enable/disable functions. > - */ > -int sa1111_enable_device(struct sa1111_dev *); > -void sa1111_disable_device(struct sa1111_dev *); > - > -int sa1111_get_irq(struct sa1111_dev *, unsigned num); > - > -unsigned int sa1111_pll_clock(struct sa1111_dev *); > - > -#define SA1111_AUDIO_ACLINK 0 > -#define SA1111_AUDIO_I2S 1 > - > -void sa1111_select_audio_mode(struct sa1111_dev *sadev, int mode); > -int sa1111_set_audio_rate(struct sa1111_dev *sadev, int rate); > -int sa1111_get_audio_rate(struct sa1111_dev *sadev); > - > -int sa1111_check_dma_bug(dma_addr_t addr); > - > -int sa1111_driver_register(struct sa1111_driver *); > -void sa1111_driver_unregister(struct sa1111_driver *); > - > -struct sa1111_platform_data { > - int irq_base; /* base for cascaded on-chip IRQs */ > - unsigned disable_devs; > - void *data; > - int (*enable)(void *, unsigned); > - void (*disable)(void *, unsigned); > -}; > - > -#endif /* _ASM_ARCH_SA1111 */ > diff --git a/arch/arm/include/asm/hardware/ssp.h b/arch/arm/include/asm/hardware/ssp.h > deleted file mode 100644 > index 72d176790308..000000000000 > --- a/arch/arm/include/asm/hardware/ssp.h > +++ /dev/null > @@ -1,25 +0,0 @@ > -/* SPDX-License-Identifier: GPL-2.0-only */ > -/* > - * ssp.h > - * > - * Copyright (C) 2003 Russell King, All Rights Reserved. > - */ > -#ifndef SSP_H > -#define SSP_H > - > -struct ssp_state { > - unsigned int cr0; > - unsigned int cr1; > -}; > - > -int ssp_write_word(u16 data); > -int ssp_read_word(u16 *data); > -int ssp_flush(void); > -void ssp_enable(void); > -void ssp_disable(void); > -void ssp_save_state(struct ssp_state *ssp); > -void ssp_restore_state(struct ssp_state *ssp); > -int ssp_init(void); > -void ssp_exit(void); > - > -#endif > diff --git a/arch/arm/include/debug/sa1100.S b/arch/arm/include/debug/sa1100.S > deleted file mode 100644 > index 7968ea52df3d..000000000000 > --- a/arch/arm/include/debug/sa1100.S > +++ /dev/null > @@ -1,67 +0,0 @@ > -/* SPDX-License-Identifier: GPL-2.0-only */ > -/* arch/arm/include/debug/sa1100.S > - * > - * Debugging macro include header > - * > - * Copyright (C) 1994-1999 Russell King > - * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks > -*/ > - > -#define UTCR3 0x0c > -#define UTDR 0x14 > -#define UTSR1 0x20 > -#define UTCR3_TXE 0x00000002 /* Transmit Enable */ > -#define UTSR1_TBY 0x00000001 /* Transmitter BusY (read) */ > -#define UTSR1_TNF 0x00000004 /* Transmit FIFO Not Full (read) */ > - > - .macro addruart, rp, rv, tmp > - mrc p15, 0, \rp, c1, c0 > - tst \rp, #1 @ MMU enabled? > - moveq \rp, #0x80000000 @ physical base address > - movne \rp, #0xf8000000 @ virtual address > - > - @ We probe for the active serial port here, coherently with > - @ the comment in arch/arm/mach-sa1100/include/mach/uncompress.h. > - @ We assume r1 can be clobbered. > - > - @ see if Ser3 is active > - add \rp, \rp, #0x00050000 > - ldr \rv, [\rp, #UTCR3] > - tst \rv, #UTCR3_TXE > - > - @ if Ser3 is inactive, then try Ser1 > - addeq \rp, \rp, #(0x00010000 - 0x00050000) > - ldreq \rv, [\rp, #UTCR3] > - tsteq \rv, #UTCR3_TXE > - > - @ if Ser1 is inactive, then try Ser2 > - addeq \rp, \rp, #(0x00030000 - 0x00010000) > - ldreq \rv, [\rp, #UTCR3] > - tsteq \rv, #UTCR3_TXE > - > - @ clear top bits, and generate both phys and virt addresses > - lsl \rp, \rp, #8 > - lsr \rp, \rp, #8 > - orr \rv, \rp, #0xf8000000 @ virtual > - orr \rp, \rp, #0x80000000 @ physical > - > - .endm > - > - .macro senduart,rd,rx > - str \rd, [\rx, #UTDR] > - .endm > - > - .macro waituartcts,rd,rx > - .endm > - > - .macro waituarttxrdy,rd,rx > -1001: ldr \rd, [\rx, #UTSR1] > - tst \rd, #UTSR1_TNF > - beq 1001b > - .endm > - > - .macro busyuart,rd,rx > -1001: ldr \rd, [\rx, #UTSR1] > - tst \rd, #UTSR1_TBY > - bne 1001b > - .endm > diff --git a/arch/arm/mach-sa1100/Kconfig b/arch/arm/mach-sa1100/Kconfig > deleted file mode 100644 > index d50721e39641..000000000000 > --- a/arch/arm/mach-sa1100/Kconfig > +++ /dev/null > @@ -1,92 +0,0 @@ > -# SPDX-License-Identifier: GPL-2.0-only > -menuconfig ARCH_SA1100 > - bool "SA11x0 Implementations (DEPRECATED)" > - depends on ARCH_MULTI_V4 && !(ARCH_MULTI_V4T || ARCH_MULTI_V5) > - depends on !(ARCH_MOXART || ARCH_GEMINI) > - depends on ATAGS > - depends on CPU_LITTLE_ENDIAN > - depends on MMU > - select ARCH_NO_SG_CHAIN > - select ARCH_MTD_XIP > - select CLKSRC_MMIO > - select CLKSRC_PXA > - select CPU_FREQ > - select CPU_SA1100 > - select GPIOLIB > - select GPIOLIB_LEGACY > - select IRQ_DOMAIN > - select ISA > - select NEED_MACH_MEMORY_H > - help > - Support for StrongARM 11x0 based boards. > - > - Support for these machines will go away in 2027, > - unless there are any remaining users that speak up. > - > -if ARCH_SA1100 > - > -config SA1100_ASSABET > - bool "Assabet" > - select ARM_SA1110_CPUFREQ > - select GPIO_REG > - select LEDS_GPIO_REGISTER > - select REGULATOR > - select REGULATOR_FIXED_VOLTAGE > - help > - Say Y here if you are using the Intel(R) StrongARM(R) SA-1110 > - Microprocessor Development Board (also known as the Assabet). > - > -config ASSABET_NEPONSET > - bool "Include support for Neponset" > - depends on SA1100_ASSABET > - select SA1111 > - help > - Say Y here if you are using the Intel(R) StrongARM(R) SA-1110 > - Microprocessor Development Board (Assabet) with the SA-1111 > - Development Board (Nepon). > - > -config SA1100_COLLIE > - bool "Sharp Zaurus SL5500" > - # FIXME: select ARM_SA11x0_CPUFREQ > - select SHARP_LOCOMO > - select SHARP_PARAM > - select SHARP_SCOOP > - help > - Say Y here to support the Sharp Zaurus SL5500 PDAs. > - > -config SA1100_H3600 > - bool "Compaq iPAQ H3600/H3700" > - select ARM_SA1110_CPUFREQ > - select HTC_EGPIO > - select MFD_IPAQ_MICRO > - help > - Say Y here if you intend to run this kernel on the Compaq iPAQ > - H3600 and H3700 handheld computers. > - > -config SA1100_JORNADA720 > - bool "HP Jornada 720" > - # FIXME: select ARM_SA11x0_CPUFREQ > - select SA1111 > - help > - Say Y here if you want to build a kernel for the HP Jornada 720 > - handheld computer. See > - > - > -config SA1100_JORNADA720_SSP > - bool "HP Jornada 720 Extended SSP driver" > - depends on SA1100_JORNADA720 > - select SA1100_SSP > - help > - Say Y here if you have a HP Jornada 7xx handheld computer and you > - want to access devices connected to the MCU. Those include the > - keyboard, touchscreen, backlight and battery. This driver also activates > - the generic SSP which it extends. > - > -config SA1100_SSP > - tristate "Generic PIO SSP" > - help > - Say Y here to enable support for the generic PIO SSP driver. > - This isn't for audio support, but for attached sensors and > - other devices, eg for BadgePAD 4 sensor support. > - > -endif > diff --git a/arch/arm/mach-sa1100/Makefile b/arch/arm/mach-sa1100/Makefile > deleted file mode 100644 > index b5816d675152..000000000000 > --- a/arch/arm/mach-sa1100/Makefile > +++ /dev/null > @@ -1,20 +0,0 @@ > -# SPDX-License-Identifier: GPL-2.0 > -# > -# Makefile for the linux kernel. > -# > - > -# Common support > -obj-y := clock.o generic.o #nmi-oopser.o > - > -# Specific board support > -obj-$(CONFIG_SA1100_ASSABET) += assabet.o > -obj-$(CONFIG_ASSABET_NEPONSET) += neponset.o > -obj-$(CONFIG_SA1100_COLLIE) += collie.o > -obj-$(CONFIG_SA1100_H3600) += h3600.o h3xxx.o > -obj-$(CONFIG_SA1100_JORNADA720) += jornada720.o > -obj-$(CONFIG_SA1100_JORNADA720_SSP) += jornada720_ssp.o > - > -# Miscellaneous functions > -obj-$(CONFIG_PM) += pm.o sleep.o > -obj-$(CONFIG_SA1100_SSP) += ssp.o > - > diff --git a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c > deleted file mode 100644 > index b001f0b6a3fa..000000000000 > --- a/arch/arm/mach-sa1100/assabet.c > +++ /dev/null > @@ -1,770 +0,0 @@ > -// SPDX-License-Identifier: GPL-2.0-only > -/* > - * linux/arch/arm/mach-sa1100/assabet.c > - * > - * Author: Nicolas Pitre > - * > - * This file contains all Assabet-specific tweaks. > - */ > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > - > -#include