patch-2.1.96 linux/arch/arm/mm/mm-ebsa110.c

Next file: linux/arch/arm/mm/mm-ebsa285.c
Previous file: linux/arch/arm/mm/mm-arc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.95/linux/arch/arm/mm/mm-ebsa110.c linux/arch/arm/mm/mm-ebsa110.c
@@ -5,3 +5,22 @@
  *
  * Copyright (C) 1998 Russell King
  */
+
+#include <asm/io.h>
+ 
+/* map in IO */
+void setup_io_pagetables(void)
+{
+	unsigned long address = IO_START;
+	int spi = IO_BASE >> PGDIR_SHIFT;
+
+	pgd_val(swapper_pg_dir[spi-1]) = 0xc0000000 | PMD_TYPE_SECT |
+					 PMD_DOMAIN(DOMAIN_KERNEL) | PMD_SECT_AP_WRITE;
+
+	while (address < IO_START + IO_SIZE && address) {
+		pgd_val(swapper_pg_dir[spi++]) = address | PMD_TYPE_SECT |
+						PMD_DOMAIN(DOMAIN_IO) |
+						PMD_SECT_AP_WRITE;
+		address += PGDIR_SIZE;
+	}
+}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov