1 /* MN10300 Misaligned multibyte-word I/O 2 * 3 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. 4 * Written by David Howells (dhowells@redhat.com) 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public Licence 8 * as published by the Free Software Foundation; either version 9 * 2 of the Licence, or (at your option) any later version. 10 */ 11 #include <linux/module.h> 12 #include <linux/string.h> 13 #include <linux/kernel.h> 14 #include <asm/io.h> 15 16 /* 17 * output data from a potentially misaligned buffer 18 */ __outsl(unsigned long addr,const void * buffer,int count)19void __outsl(unsigned long addr, const void *buffer, int count) 20 { 21 const unsigned char *buf = buffer; 22 unsigned long val; 23 24 while (count--) { 25 memcpy(&val, buf, 4); 26 outl(val, addr); 27 buf += 4; 28 } 29 } 30 EXPORT_SYMBOL(__outsl); 31