diff --git a/Makefile b/Makefile
index 5573127..52f6c98 100644
--- a/Makefile
+++ b/Makefile
@@ -921,7 +921,7 @@
 endif
 
 ifneq ($(NEED_SERIAL), )
-LIB_OBJS += serial.o
+LIB_OBJS += serial.o custom_baud.o
 endif
 
 ifneq ($(NEED_POSIX_SOCKETS), )
diff --git a/custom_baud.c b/custom_baud.c
new file mode 100644
index 0000000..0caca80
--- /dev/null
+++ b/custom_baud.c
@@ -0,0 +1,78 @@
+/*
+ * This file is part of the flashrom project.
+ *
+ * Copyright (C) 2017 Urja Rannikko <urjaman@gmail.com>
+ *
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
+#include "platform.h"
+#include "custom_baud.h"
+
+#if IS_LINUX
+#include <sys/ioctl.h>
+#include <fcntl.h>
+#include <asm-generic/termbits.h>
+#include <asm-generic/ioctls.h>
+
+/*
+ * This include hell above is why this is in a separate source file. See eg.
+ * https://www.downtowndougbrown.com/2013/11/linux-custom-serial-baud-rates/
+ * https://stackoverflow.com/questions/12646324/how-to-set-a-custom-baud-rate-on-linux
+ * https://github.com/jbkim/Linux-custom-baud-rate
+ * for more info.
+ */
+
+int set_custom_baudrate(int fd, unsigned int baud)
+{
+	struct termios2 tio;
+	if (ioctl(fd, TCGETS2, &tio)) {
+		return -1;
+	}
+	tio.c_cflag &= ~CBAUD;
+	tio.c_cflag |= BOTHER;
+	tio.c_ispeed = baud;
+	tio.c_ospeed = baud;
+	return ioctl(fd, TCSETS2, &tio);
+}
+
+int use_custom_baud(unsigned int baud, const struct baudentry *baudtable)
+{
+	int i;
+	for (i = 0; baudtable[i].baud; i++) {
+		if (baudtable[i].baud == baud)
+			return 0;
+
+		if (baudtable[i].baud > baud)
+			return 1;
+	}
+	return 1;
+}
+
+#else
+#include <errno.h>
+
+/* Stub, should not get called. */
+int set_custom_baudrate(int fd, unsigned int baud)
+{
+	errno = ENOSYS; /* Hoping "Function not supported" will make you look here. */
+	return -1;
+}
+
+int use_custom_baud(unsigned int baud, const struct baudentry *baudtable)
+{
+	return 0;
+}
+#endif
diff --git a/custom_baud.h b/custom_baud.h
new file mode 100644
index 0000000..ae286f5
--- /dev/null
+++ b/custom_baud.h
@@ -0,0 +1,35 @@
+/*
+ * This file is part of the flashrom project.
+ *
+ * Copyright (C) 2017 Urja Rannikko <urjaman@gmail.com>
+ *
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
+#ifndef __CUSTOM_BAUD_H__
+#define __CUSTOM_BAUD_H__ 1
+
+struct baudentry {
+	int flag;
+	unsigned int baud;
+};
+
+int set_custom_baudrate(int fd, unsigned int baud);
+
+/* Returns 1 if non-exact rate would be used, and setting a custom rate is supported.
+   The baudtable must be in ascending order and terminated with a 0-baud entry. */
+int use_custom_baud(unsigned int baud, const struct baudentry *baudtable);
+
+#endif
diff --git a/serial.c b/serial.c
index a64a51d..608464b 100644
--- a/serial.c
+++ b/serial.c
@@ -40,6 +40,7 @@
 #endif
 #include "flash.h"
 #include "programmer.h"
+#include "custom_baud.h"
 
 fdtype sp_fd = SER_INV_FD;
 
@@ -49,18 +50,14 @@
  * The code below creates a mapping in sp_baudtable between these macros and the numerical baud rates to deal
  * with numerical user input.
  *
- * On Linux there is a non-standard way to use arbitrary baud rates that flashrom does not support (yet), cf.
- * http://www.downtowndougbrown.com/2013/11/linux-custom-serial-baud-rates/
+ * On Linux there is a non-standard way to use arbitrary baud rates that we use if there is no
+ * matching standard rate, see custom_baud.c
  *
  * On Windows there exist similar macros (starting with CBR_ instead of B) but they are only defined for
  * backwards compatibility and the API supports arbitrary baud rates in the same manner as the macros, see
  * http://msdn.microsoft.com/en-us/library/windows/desktop/aa363214(v=vs.85).aspx
  */
 #if !IS_WINDOWS
-struct baudentry {
-	int flag;
-	unsigned int baud;
-};
 #define BAUDENTRY(baud) { B##baud, baud },
 
 static const struct baudentry sp_baudtable[] = {
@@ -195,10 +192,25 @@
 	}
 	wanted = observed;
 	if (baud >= 0) {
-		const struct baudentry *entry = round_baud(baud);
-		if (cfsetispeed(&wanted, entry->flag) != 0 || cfsetospeed(&wanted, entry->flag) != 0) {
-			msg_perr_strerror("Could not set serial baud rate: ");
-			return 1;
+		if (use_custom_baud(baud, sp_baudtable)) {
+			if (set_custom_baudrate(fd, baud)) {
+				msg_perr_strerror("Could not set custom baudrate: ");
+				return 1;
+			}
+			/* We want whatever the termios looks like now, so the rest of the
+			   setup doesnt mess up the custom rate. */
+			if (tcgetattr(fd, &wanted) != 0) {
+				/* This should pretty much never happen (see above), but.. */
+				msg_perr_strerror("Could not fetch serial port configuration: ");
+				return 1;
+			}
+			msg_pdbg("Using custom baud rate.\n");
+		} else {
+			const struct baudentry *entry = round_baud(baud);
+			if (cfsetispeed(&wanted, entry->flag) != 0 || cfsetospeed(&wanted, entry->flag) != 0) {
+				msg_perr_strerror("Could not set serial baud rate: ");
+				return 1;
+			}
 		}
 	}
 	wanted.c_cflag &= ~(PARENB | CSTOPB | CSIZE | CRTSCTS);
