Move flash related flags to the flash driver; refactor accordingly.
[bertos.git] / bertos / cpu / arm / drv / flash_at91.c
index 1cdf6b788e0e8678ea6a7a5fc6609aa640a6c72e..514d54e4326811042b4ea7dcafcf0e1f5e815857 100644 (file)
@@ -222,21 +222,20 @@ static void common_init(Flash *fls)
        fls->blk.blk_cnt = FLASH_MEM_SIZE / FLASH_PAGE_SIZE_BYTES;
 }
 
-void flash_hw_init(Flash *fls, int flags)
+void flash_hw_init(Flash *fls, UNUSED_ARG(int, flags))
 {
        common_init(fls);
        fls->blk.priv.vt = &flash_at91_buffered_vt;
-       fls->blk.priv.flags |= KB_BUFFERED | KB_PARTIAL_WRITE | flags;
+       fls->blk.priv.flags |= KB_BUFFERED | KB_PARTIAL_WRITE;
        fls->blk.priv.buf = flash_buf;
 
        /* Load the first block in the cache */
        memcpy(fls->blk.priv.buf, (void *)(FLASH_BASE), fls->blk.blk_size);
 }
 
-void flash_hw_initUnbuffered(Flash *fls, int flags)
+void flash_hw_initUnbuffered(Flash *fls, UNUSED_ARG(int, flags))
 {
        common_init(fls);
        fls->blk.priv.vt = &flash_at91_unbuffered_vt;
-       fls->blk.priv.flags |= flags;
 }