1
0
mirror of git://projects.qi-hardware.com/f32xbase.git synced 2024-11-23 22:35:20 +02:00

f32x: open /dev/mem with O_SYNC to disable caching

- f32x/gpio-s3c24xx.c (gpio_init), f32x/gpio-xburst.c (gpio_init): open
  /dev/mem with O_SYNC to disable caching
This commit is contained in:
Werner Almesberger 2011-01-03 18:33:56 -03:00
parent 88fa3ad057
commit 6dbd844d0f
2 changed files with 6 additions and 6 deletions

View File

@ -1,8 +1,8 @@
/* /*
* f32x/gpio-s3c24xx.c - Really primitive S3C244x GPIO access. Ports B-H only. * f32x/gpio-s3c24xx.c - Really primitive S3C244x GPIO access. Ports B-H only.
* *
* Written 2008 by Werner Almesberger * Written 2008, 2011 by Werner Almesberger
* Copyright 2008 Werner Almesberger * Copyright 2008, 2011 Werner Almesberger
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -29,7 +29,7 @@ void gpio_init(void)
{ {
int fd; int fd;
fd = open("/dev/mem", O_RDWR); fd = open("/dev/mem", O_RDWR | O_SYNC);
if (fd < 0) { if (fd < 0) {
perror("/dev/mem"); perror("/dev/mem");
exit(1); exit(1);

View File

@ -1,8 +1,8 @@
/* /*
* f32x/gpio-xburst.c - Really primitive XBurst GPIO access * f32x/gpio-xburst.c - Really primitive XBurst GPIO access
* *
* Written 2010 by Werner Almesberger * Written 2010-2011 by Werner Almesberger
* Copyright 2010 Werner Almesberger * Copyright 2010-2011 Werner Almesberger
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -29,7 +29,7 @@ void gpio_init(void)
{ {
int fd; int fd;
fd = open("/dev/mem", O_RDWR); fd = open("/dev/mem", O_RDWR | O_SYNC);
if (fd < 0) { if (fd < 0) {
perror("/dev/mem"); perror("/dev/mem");
exit(1); exit(1);