~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/arm/lib/io-shark.c

Version: ~ [ linux-5.9 ] ~ [ linux-5.8.14 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.70 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.150 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.200 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.238 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.238 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  *  linux/arch/arm/lib/io-shark.c
  3  *
  4  *  by Alexander Schulz
  5  *
  6  * derived from:
  7  * linux/arch/arm/lib/io-ebsa.S
  8  * Copyright (C) 1995, 1996 Russell King
  9  *
 10  * This program is free software; you can redistribute it and/or modify
 11  * it under the terms of the GNU General Public License version 2 as
 12  * published by the Free Software Foundation.
 13  */
 14 #include <linux/kernel.h>
 15 
 16 #include <asm/io.h>
 17 
 18 void print_warning(void)
 19 {
 20         printk(KERN_WARNING "ins?/outs? not implemented on this architecture\n");
 21 }
 22 
 23 void insl(unsigned int port, void *to, int len)
 24 {
 25         print_warning();
 26 }
 27 
 28 void insb(unsigned int port, void *to, int len)
 29 {
 30         print_warning();
 31 }
 32 
 33 void outsl(unsigned int port, const void *from, int len)
 34 {
 35         print_warning();
 36 }
 37 
 38 void outsb(unsigned int port, const void *from, int len)
 39 {
 40         print_warning();
 41 }
 42 
 43 /* these should be in assembler again */
 44 
 45 /*
 46  * Purpose: read a block of data from a hardware register to memory.
 47  * Proto  : insw(int from_port, void *to, int len_in_words);
 48  * Proto  : inswb(int from_port, void *to, int len_in_bytes);
 49  * Notes  : increment to
 50  */
 51 
 52 void insw(unsigned int port, void *to, int len)
 53 {
 54         int i;
 55 
 56         for (i = 0; i < len; i++)
 57                 ((unsigned short *) to)[i] = inw(port);
 58 }
 59 
 60 void inswb(unsigned int port, void *to, int len)
 61 {
 62         insw(port, to, len >> 2);
 63 }
 64 
 65 /*
 66  * Purpose: write a block of data from memory to a hardware register.
 67  * Proto  : outsw(int to_reg, void *from, int len_in_words);
 68  * Proto  : outswb(int to_reg, void *from, int len_in_bytes);
 69  * Notes  : increments from
 70  */
 71 
 72 void outsw(unsigned int port, const void *from, int len)
 73 {
 74         int i;
 75 
 76         for (i = 0; i < len; i++)
 77                 outw(((unsigned short *) from)[i], port);
 78 }
 79 
 80 void outswb(unsigned int port, const void *from, int len)
 81 {
 82         outsw(port, from, len >> 2);
 83 }
 84 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp