sst49lfxxxc.c 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * This file is part of the flashrom project.
  3. *
  4. * Copyright (C) 2000 Silicon Integrated System Corporation
  5. * Copyright (C) 2005-2007 coresystems GmbH
  6. * Copyright (C) 2009 Sean Nelson <audiohacked@gmail.com>
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  21. */
  22. #include "flash.h"
  23. #include "chipdrivers.h"
  24. int erase_sector_49lfxxxc(struct flashctx *flash, unsigned int address,
  25. unsigned int sector_size)
  26. {
  27. uint8_t status;
  28. chipaddr bios = flash->virtual_memory;
  29. chip_writeb(flash, 0x30, bios);
  30. chip_writeb(flash, 0xD0, bios + address);
  31. status = wait_82802ab(flash);
  32. print_status_82802ab(status);
  33. /* FIXME: Check the status register for errors. */
  34. return 0;
  35. }